summaryrefslogtreecommitdiff
path: root/native/jni/native-lib/cpnet.c
diff options
context:
space:
mode:
authorMark Wielaard <mark@klomp.org>2007-04-18 08:14:33 +0000
committerMark Wielaard <mark@klomp.org>2007-04-18 08:14:33 +0000
commitef0603a0f5956c6fc3d04cf91701d6c311bd6466 (patch)
tree70d4788c32769a425794b843589e3ee07052f3b8 /native/jni/native-lib/cpnet.c
parent7d6b20f457385b7b6b6e558da3b5806475aa5afa (diff)
downloadclasspath-ef0603a0f5956c6fc3d04cf91701d6c311bd6466.tar.gz
2007-04-17 Andrew John Hughes <gnu_andrew@member.fsf.org>
* native/jni/java-net/local.c: Fix import of FIONREAD. * native/jni/java-nio/gnu_java_nio_VMChannel.c, * native/jni/native-lib/cpnet.c: Likewise.
Diffstat (limited to 'native/jni/native-lib/cpnet.c')
-rw-r--r--native/jni/native-lib/cpnet.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/native/jni/native-lib/cpnet.c b/native/jni/native-lib/cpnet.c
index f4ff0f15a..22ce69e27 100644
--- a/native/jni/native-lib/cpnet.c
+++ b/native/jni/native-lib/cpnet.c
@@ -46,11 +46,18 @@ exception statement from your version. */
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netdb.h>
-#include <sys/ioctl.h>
#include <sys/time.h>
#include <unistd.h>
#include <arpa/inet.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 "cpnet.h"
#define SOCKET_DEFAULT_TIMEOUT -1 /* milliseconds */