natPlainSocketImpl.cc: Include sys/ioctl.h and sys/filio.h, if present.
authorJerome Marc <marcjero@yahoo.com>
Thu, 2 May 2002 17:33:59 +0000 (17:33 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Thu, 2 May 2002 17:33:59 +0000 (17:33 +0000)
2002-05-02  Jerome Marc  <marcjero@yahoo.com>

* java/net/natPlainSocketImpl.cc: Include sys/ioctl.h and
sys/filio.h, if present.

From-SVN: r53050

libjava/ChangeLog
libjava/java/net/natPlainSocketImpl.cc

index 9a0891bde09b388d7e6a5af58ba17520391981b7..c774a85fab1f2e645c65f23519b8c9cdae465cea 100644 (file)
@@ -1,3 +1,8 @@
+2002-05-02  Jerome Marc  <marcjero@yahoo.com>
+
+       * java/net/natPlainSocketImpl.cc: Include sys/ioctl.h and
+       sys/filio.h, if present.
+
 2002-04-30  Tom Tromey  <tromey@redhat.com>
 
        * java/io/BufferedReader.java (fill): Handle case where markPos
index 2c6a2415cfb716a7ca4000ab45bcc96ac4595618..e16c372d989f9135adec604ead8b78f81d35eadf 100644 (file)
@@ -46,11 +46,23 @@ read(int s, void *buf, int len)
 #define ENOPROTOOPT 109
 #endif
 #else /* WIN32 */
+
+#ifdef HAVE_SYS_IOCTL_H
+#define BSD_COMP /* Get FIONREAD on Solaris2. */
+#include <sys/ioctl.h>
+#endif
+
+// Pick up FIONREAD on Solaris 2.5.
+#ifdef HAVE_SYS_FILIO_H
+#include <sys/filio.h>
+#endif
+
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
 #include <errno.h>
 #include <string.h>
+
 #endif /* WIN32 */
 #endif /* DISABLE_JAVA_NET */