From 4d7f87c1a818bd7503e6de966ae9fe1f84aef3cb Mon Sep 17 00:00:00 2001
From: johns <>
Date: Sat, 17 Aug 2002 12:16:05 +0000
Subject: [PATCH] BeOS fix from Berend de Boer.

---
 doc/freecraft.html         | 1 +
 src/include/net_lowlevel.h | 2 +-
 src/network/lowlevel.cpp   | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/doc/freecraft.html b/doc/freecraft.html
index 12bdc6eb8..6fca7eccc 100644
--- a/doc/freecraft.html
+++ b/doc/freecraft.html
@@ -843,6 +843,7 @@ Without any order:
     <LI>Martin Renold
     <LI>Martin Hajduch
     <LI>Jeff Binder
+    <LI>Berend de Boer
     </UL>
     <P><EM>And to all I have forgot to write up!</EM><BR>
     Please drop me an email, if I forgot you.
diff --git a/src/include/net_lowlevel.h b/src/include/net_lowlevel.h
index eda1c3297..43bcb58da 100644
--- a/src/include/net_lowlevel.h
+++ b/src/include/net_lowlevel.h
@@ -86,8 +86,8 @@ typedef struct _OLD_INTERFACE_INFO
 #  include <netdb.h>
 #  include <sys/socket.h>
 #  include <sys/ioctl.h>
-#  include <net/if.h>
 #  ifndef __BEOS__
+#     include <net/if.h>
 #    include <arpa/inet.h>
 #  endif
 #  define INVALID_SOCKET -1
diff --git a/src/network/lowlevel.cpp b/src/network/lowlevel.cpp
index 858e9fbdb..26a6fb1b8 100644
--- a/src/network/lowlevel.cpp
+++ b/src/network/lowlevel.cpp
@@ -467,12 +467,14 @@ global int NetConnectTCP(int sockfd,char* host,int port)
 {
     struct sockaddr_in sa;
     unsigned long addr;
+#ifndef __BEOS__
     int opt;
 
     opt = 1;
     setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, (void*)&opt, sizeof(opt));
     opt = 0;
     setsockopt(sockfd, SOL_SOCKET, SO_LINGER, (void*)&opt, sizeof(opt));
+#endif
 
     addr=NetResolveHost(host);
     if( addr==INADDR_NONE ) {