diff -u -b -B --recursive samba-2.0.0beta5/source/client/client.c samba-beos-2.0.0beta5/source/client/client.c
--- samba-2.0.0beta5/source/client/client.c	Wed Dec 30 17:36:50 1998
+++ samba-beos-2.0.0beta5/source/client/client.c	Wed Jan 13 21:57:27 1999
@@ -1586,7 +1586,9 @@
 		DEBUG(0,("smb: %s> ", CNV_LANG(cur_dir)));
 		dbgflush( );
 		
+#ifndef __BEOS__
 		wait_keyboard();
+#endif
 		
 		/* and get a response */
 		if (!fgets(line,1000,stdin))
diff -u -b -B --recursive samba-2.0.0beta5/source/config.guess samba-beos-2.0.0beta5/source/config.guess
--- samba-2.0.0beta5/source/config.guess	Wed Dec 30 17:36:40 1998
+++ samba-beos-2.0.0beta5/source/config.guess	Wed Jan 13 23:03:46 1999
@@ -51,6 +51,9 @@
 # Note: order is significant - the case branches are not exclusive.
 
 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    BePC:BeOS:4.*:*)
+        echo i386-be-elf
+        exit 0 ;;
     news*:NEWS-OS:6.*:*)
         echo mips-sony-newsos6
         exit 0 ;;
diff -u -b -B --recursive samba-2.0.0beta5/source/include/includes.h samba-beos-2.0.0beta5/source/include/includes.h
--- samba-2.0.0beta5/source/include/includes.h	Wed Dec 30 17:36:52 1998
+++ samba-beos-2.0.0beta5/source/include/includes.h	Tue Jan 12 18:45:14 1999
@@ -197,7 +197,9 @@
 #endif
 
 #include <netinet/in.h>
+#ifndef __BEOS__
 #include <arpa/inet.h>
+#endif
 #include <netdb.h>
 #include <syslog.h>
 #include <sys/file.h>
@@ -811,5 +813,18 @@
 
 /* yuck, I'd like a better way of doing this */
 #define DIRP_SIZE (256 + 32)
+
+#ifdef __BEOS__
+
+#define PF_INET AF_INET
+
+char *getbeospass(char *prompt);
+
+int ret_zero(int a);
+
+#define getpass(prompt) getbeospass((prompt))
+#define seteuid(euid) ret_zero((euid))
+#define setegid(egid) ret_zero((egid))
+#endif
 
 #endif /* _INCLUDES_H */
diff -u -b -B --recursive samba-2.0.0beta5/source/lib/system.c samba-beos-2.0.0beta5/source/lib/system.c
--- samba-2.0.0beta5/source/lib/system.c	Wed Dec 30 17:36:54 1998
+++ samba-beos-2.0.0beta5/source/lib/system.c	Wed Jan 13 21:57:16 1999
@@ -558,3 +558,15 @@
   return ngroups;
 #endif /* HAVE_BROKEN_GETGROUPS */
 }
+
+#ifdef __BEOS__
+char *getbeospass(char *prompt)
+{
+  char *retval = malloc(256);
+  printf("%s",prompt);
+  fgets(retval,sizeof(retval),stdin);
+  return retval;
+}
+
+int ret_zero(int a) { return 0; }
+#endif
diff -u -b -B --recursive samba-2.0.0beta5/source/lib/util_sock.c samba-beos-2.0.0beta5/source/lib/util_sock.c
--- samba-2.0.0beta5/source/lib/util_sock.c	Mon Dec 14 17:21:06 1998
+++ samba-beos-2.0.0beta5/source/lib/util_sock.c	Tue Jan 12 19:08:45 1999
@@ -52,7 +52,11 @@
 {
   int v,l;
   l = sizeof(int);
+#ifdef __BEOS__
+  return SOCK_STREAM;
+#else 
   return(getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&v, &l) == 0);
+#endif
 }
 
 
@@ -66,9 +70,13 @@
   int value;
   int opttype;
 } socket_options[] = {
+#ifndef __BEOS__
   {"SO_KEEPALIVE",      SOL_SOCKET,    SO_KEEPALIVE,    0,                 OPT_BOOL},
+#endif
   {"SO_REUSEADDR",      SOL_SOCKET,    SO_REUSEADDR,    0,                 OPT_BOOL},
+#ifndef __BEOS__
   {"SO_BROADCAST",      SOL_SOCKET,    SO_BROADCAST,    0,                 OPT_BOOL},
+#endif
 #ifdef TCP_NODELAY
   {"TCP_NODELAY",       IPPROTO_TCP,   TCP_NODELAY,     0,                 OPT_BOOL},
 #endif
@@ -167,7 +175,11 @@
   sslutil_disconnect(Client);
 #endif /* WITH_SSL */
 
+#ifdef __BEOS__
+  closesocket(Client);
+#else
   close(Client);
+#endif
   Client = -1;
 }
 
@@ -252,7 +264,11 @@
         readret = read(fd, buf + nread, maxcnt - nread);
       }
 #else /* WITH_SSL */
+#ifdef __BEOS__
+      readret = recv(fd, buf + nread, maxcnt - nread, 0);
+#else
       readret = read(fd, buf + nread, maxcnt - nread);
+#endif
 #endif /* WITH_SSL */
 
       if (readret == 0) {
@@ -306,7 +322,11 @@
       readret = read(fd, buf + nread, maxcnt - nread);
     }
 #else /* WITH_SSL */
+#ifdef __BEOS__
+    readret = recv(fd, buf+nread, maxcnt-nread, 0);
+#else
     readret = read(fd, buf+nread, maxcnt-nread);
+#endif
 #endif /* WITH_SSL */
 
     if (readret == 0) {
@@ -363,7 +383,11 @@
       ret = read(fd,buffer + total,N - total);
     }
 #else /* WITH_SSL */
+#ifdef __BEOS__
+    ret = recv(fd,buffer + total,N - total, 0);
+#else
     ret = read(fd,buffer + total,N - total);
+#endif
 #endif /* WITH_SSL */
 
     if (ret == 0)
@@ -399,7 +423,11 @@
       ret = write(fd,buffer + total,N - total);
     }
 #else /* WITH_SSL */
+#ifdef __BEOS__
+    ret = send(fd,buffer + total,N - total, 0);
+#else
     ret = write(fd,buffer + total,N - total);
+#endif
 #endif /* WITH_SSL */
 
     if (ret == -1) return -1;
@@ -610,7 +638,11 @@
     DEBUG(0,("Packet send to %s(%d) failed ERRNO=%s\n",
 	     inet_ntoa(ip),port,strerror(errno)));
 
+#ifdef __BEOS__
+  closesocket(out_fd);
+#else
   close(out_fd);
+#endif
   return(ret);
 }
 
@@ -720,7 +752,11 @@
   if (ret < 0 && (errno == EINPROGRESS || errno == EALREADY ||
          errno == EAGAIN)) {
       DEBUG(1,("timeout connecting to %s:%d\n",inet_ntoa(*addr),port));
+#ifdef __BEOS__
+      closesocket(res);
+#else
       close(res);
+#endif
       return -1;
   }
 
@@ -734,7 +770,11 @@
   if (ret < 0) {
     DEBUG(1,("error connecting to %s:%d (%s)\n",
 	     inet_ntoa(*addr),port,strerror(errno)));
+#ifdef __BEOS__
+    closesocket(res);
+#else
     close(res);
+#endif
     return -1;
   }
 
diff -u -b -B --recursive samba-2.0.0beta5/source/libsmb/clientgen.c samba-beos-2.0.0beta5/source/libsmb/clientgen.c
--- samba-2.0.0beta5/source/libsmb/clientgen.c	Wed Dec 30 17:36:55 1998
+++ samba-beos-2.0.0beta5/source/libsmb/clientgen.c	Tue Jan 12 19:09:44 1999
@@ -2444,7 +2444,11 @@
       sslutil_disconnect(cli->fd);
 #endif /* WITH_SSL */
 	if (cli->fd != -1) 
+#ifdef __BEOS__
+      closesocket(cli->fd);
+#else
       close(cli->fd);
+#endif
 	memset(cli, 0, sizeof(*cli));
 }
 
diff -u -b -B --recursive samba-2.0.0beta5/source/libsmb/namequery.c samba-beos-2.0.0beta5/source/libsmb/namequery.c
--- samba-2.0.0beta5/source/libsmb/namequery.c	Mon Dec 14 17:21:06 1998
+++ samba-beos-2.0.0beta5/source/libsmb/namequery.c	Tue Jan 12 19:10:43 1999
@@ -519,10 +519,18 @@
 		      if(iplist != NULL) {
 			      *return_ip = iplist[0];
 			      free((char *)iplist);
+#ifdef __BEOS__
+            closesocket(sock);
+#else
 			      close(sock);
+#endif
 			      return True;
 		      }
+#ifdef __BEOS__
+          closesocket(sock);
+#else
 		      close(sock);
+#endif
 	      }
       }
 
diff -u -b -B --recursive samba-2.0.0beta5/source/tests/summary.c samba-beos-2.0.0beta5/source/tests/summary.c
--- samba-2.0.0beta5/source/tests/summary.c	Fri Sep 25 16:40:49 1998
+++ samba-beos-2.0.0beta5/source/tests/summary.c	Wed Jan 13 21:40:00 1999
@@ -2,6 +2,11 @@
 
 main()
 {
+#ifdef __BEOS__
+  printf("WARNING: BeOS doesn't like anything in tests/summary.c\n");
+  exit(0);
+#endif
+
 #ifndef HAVE_FCNTL_LOCK
 	printf("ERROR: No locking available. Running Samba would be unsafe\n");
 	exit(1);

