diff -urN japhar/configure.in japhar.beos/configure.in
--- japhar/configure.in	Mon Jul 12 14:00:21 1999
+++ japhar.beos/configure.in	Sat Jul 17 17:04:49 1999
@@ -273,6 +273,7 @@
 AC_CHECK_FUNCS(fsync)
 AC_CHECK_FUNCS(mergesort qsort)
 AC_CHECK_FUNCS(resolvepath)
+AC_CHECK_FUNCS(utimes getsockopt)
 
 dnl
 dnl figure out which thread library we're supposed to be using.
diff -urN japhar/lib/libnative/java.io/unixfilesystem.c japhar.beos/lib/libnative/java.io/unixfilesystem.c
--- japhar/lib/libnative/java.io/unixfilesystem.c	Mon Jun 28 17:52:25 1999
+++ japhar.beos/lib/libnative/java.io/unixfilesystem.c	Sat Jul 17 17:01:44 1999
@@ -383,11 +383,19 @@
       /* XX is mtime microseconds? */
       times[1].tv_sec = mtime;
       times[1].tv_usec = 0;
-      
+
+#if defined(HAVE_UTIMES)      
       if (0 != utimes(path_str, times))
 	ret_val = JNI_FALSE;
       else
 	ret_val = JNI_TRUE;
+#else
+      /* BeOS have no utimes. */
+      if (0 != utime(path_str, buf))
+	ret_val = JNI_FALSE;
+      else
+	ret_val = JNI_TRUE;
+#endif
     }
   
   free(path_str);
diff -urN japhar/lib/libnative/java.net/socket.c japhar.beos/lib/libnative/java.net/socket.c
--- japhar/lib/libnative/java.net/socket.c	Sun Jul 11 18:42:10 1999
+++ japhar.beos/lib/libnative/java.net/socket.c	Sat Jul 17 17:01:50 1999
@@ -62,6 +62,10 @@
 
 #define MYLOG "Native"
 
+#if !defined(PF_INET)
+#define PF_INET AF_INET
+#endif
+
 /* These should be moved into one place, maybe a header file. */
 const char *const IOException = "java/io/IOException";
 const char *const BindException = "java/net/BindException";
@@ -74,6 +78,14 @@
 const char *const DatagramSocketImpl = "java/net/DatagramSocketImpl";
 const char *const DatagramPacket = "java/net/DatagramPacket";
 
+#ifndef HAVE_GETSOCKOPT
+/* BeOS have no getsockopt function. */
+int getsockopt(int sd, int prot, int opt, const void * value, void * size)
+{
+  return -1;
+}
+#endif
+
 /* Debug code */
 static void
 log_sockname(int sock_fd)
@@ -448,6 +460,7 @@
 get_so_linger(JNIEnv *env, int sock_fd)
 {
   HungryEnv *henv = THREAD_getEnv();
+#if defined(SO_LINGER)
   struct linger linger;
   int linger_length = sizeof(struct linger);
   int retval;
@@ -462,6 +475,10 @@
       return -1;
     }
   return linger.l_linger;
+#else
+  throw_Exception(henv, SocketException,
+		  "Unimplemented socket option SO_LINGER");
+#endif
 }
 
 static void
@@ -469,6 +486,7 @@
 	      jint centisecond)  /* in 1/100 second */
 {
   HungryEnv *henv = THREAD_getEnv();
+#if defined(SO_LINGER)
   struct linger linger;
   int retval;
 
@@ -480,6 +498,10 @@
   if (0 > retval)
     throw_Exception(henv, SocketException,
 		    "Unable to set socket option SO_LINGER");
+#else
+  throw_Exception(henv, SocketException,
+		  "Unimplemented socket option SO_LINGER");
+#endif
 }
 
 static jint
@@ -622,6 +644,7 @@
 					   jobject address)
 {
   HungryEnv *henv = THREAD_getEnv();
+#if defined(MSG_PEEK)
   int sock_fd = get_object_fd(env, obj, DatagramSocketImpl);
   struct sockaddr_in sock_addr;
   size_t addr_len = sizeof(sock_addr);
@@ -639,6 +662,11 @@
   set_inetaddress(env, address, ntohl(sock_addr.sin_addr.s_addr));
 
   return retval;
+#else
+ throw_Exception(henv, SocketException,
+		 "not implementation MSG_PEEK");
+  return 0;
+#endif
 }
 
 JNIEXPORT void JNICALL
@@ -1135,6 +1163,7 @@
   switch (opt)
     {
     case Socket_TCP_NODELAY:
+#if defined(TCP_NODELAY)
       {
 	int v;
 	int retval;
@@ -1149,6 +1178,10 @@
 	  throw_Exception(henv, SocketException,
 			  "Unable to set socket option SO_NODELAY");
       }
+#else
+      throw_Exception(henv, SocketException,
+		      "not implementation socket option SO_NODELAY");
+#endif
       break;
     case Socket_SO_REUSEADDR:
       set_so_reuseaddr(env, sock_fd, getIntegerObjValue(env, value));
@@ -1184,6 +1217,7 @@
   switch (opt)
     {
     case Socket_TCP_NODELAY:
+#if defined(TCP_NODELAY)
       {
 	int value;
 	int value_size = sizeof(value);
@@ -1201,6 +1235,10 @@
 	else
 	  return value;
       }
+#else
+      throw_Exception(henv, SocketException,
+		      "not implementation socket option SO_NODELAY");
+#endif
       break;
     case Socket_SO_REUSEADDR:
       return get_so_reuseaddr(env, sock_fd);
