summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--configure.ac6
-rw-r--r--native/jni/java-net/java_net_VMNetworkInterface.c6
3 files changed, 19 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 61c21523c..690aa06a8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2008-07-07 Christian Thalinger <twisti@complang.tuwien.ac.at>
+
+ * configure.ac (AC_CHECK_HEADERS): Added sys/sockio.h, required
+ for Solaris.
+ (AC_CHECK_LIB): Check for socket.
+ * native/jni/java-net/java_net_VMNetworkInterface.c (unistd.h):
+ Added.
+ [HAVE_SYS_SOCKIO_H] (sys/sockio.h): Likewise.
+
2008-07-07 Andrew John Hughes <gnu_andrew@member.fsf.org>
* THANKYOU: Added Byeogncheol.
diff --git a/configure.ac b/configure.ac
index b9eab87e3..c5176481f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -398,6 +398,7 @@ if test "x${COMPILE_JNI}" = xyes; then
dnl Check for crt_externs.h on Darwin.
dnl Check for netinet/in_systm.h, netinet/ip.h and net/if.h for Windows CE.
dnl Check for sys/loadavg.h for getloadavg() on Solaris 9.
+ dnl Check for sys/sockio.h for SIOCGIFFLAGS on OpenSolaris.
AC_CHECK_HEADERS([unistd.h sys/types.h sys/config.h sys/ioctl.h \
asm/ioctls.h \
inttypes.h stdint.h utime.h sys/utime.h sys/filio.h \
@@ -410,14 +411,15 @@ if test "x${COMPILE_JNI}" = xyes; then
sys/event.h sys/epoll.h \
ifaddrs.h \
netinet/in_systm.h netinet/ip.h net/if.h \
- sys/loadavg.h])
+ sys/loadavg.h sys/sockio.h])
AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
AC_EGREP_HEADER(u_int32_t, sys/types.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t]))
AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t]))
- AC_SEARCH_LIBS([inet_pton],[nsl])
+ AC_SEARCH_LIBS([inet_pton],[nsl])
+ AC_CHECK_LIB([socket], [gethostname])
AC_CHECK_FUNCS([ftruncate fsync select \
gethostname socket strerror fork pipe execve open close \
lseek fstat read readv write writev htonl memset htons connect \
diff --git a/native/jni/java-net/java_net_VMNetworkInterface.c b/native/jni/java-net/java_net_VMNetworkInterface.c
index 31e020509..658299733 100644
--- a/native/jni/java-net/java_net_VMNetworkInterface.c
+++ b/native/jni/java-net/java_net_VMNetworkInterface.c
@@ -52,6 +52,12 @@ exception statement from your version. */
#include <net/if.h>
#include <sys/ioctl.h>
+/* Required on Solaris. */
+#include <unistd.h>
+
+#ifdef HAVE_SYS_SOCKIO_H
+# include <sys/sockio.h>
+#endif
#include <jni.h>
#include <jcl.h>