summaryrefslogtreecommitdiffstats
path: root/libjava/classpath/native/jni/java-net/local.c
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/native/jni/java-net/local.c')
-rw-r--r--libjava/classpath/native/jni/java-net/local.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libjava/classpath/native/jni/java-net/local.c b/libjava/classpath/native/jni/java-net/local.c
index c8ca91c2ab5..b7ec6f26480 100644
--- a/libjava/classpath/native/jni/java-net/local.c
+++ b/libjava/classpath/native/jni/java-net/local.c
@@ -45,13 +45,20 @@ exception statement from your version. */
#include <unistd.h>
#include <string.h>
#include <errno.h>
-#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <stdio.h>
+#if defined(HAVE_SYS_IOCTL_H)
+#define BSD_COMP /* Get FIONREAD on Solaris2 */
+#include <sys/ioctl.h>
+#endif
+#if defined(HAVE_SYS_FILIO_H) /* Get FIONREAD on Solaris 2.5 */
+#include <sys/filio.h>
+#endif
+
#include "local.h"
const char *
OpenPOWER on IntegriCloud