summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-01-17 13:13:11 +0000
committertron <tron@openttd.org>2005-01-17 13:13:11 +0000
commitc44594c3fa721c1acda57b1bad3f0f3dd2fba5c1 (patch)
tree4c8968faf3e014cea3a841b8330f6f201c3240cf
parent0fc9a98dfd065ff174a8f3341a69660520fecf86 (diff)
downloadopenttd-c44594c3fa721c1acda57b1bad3f0f3dd2fba5c1.tar.xz
(svn r1552) Make ottd compile on Zeta
-rw-r--r--Makefile5
-rw-r--r--network_core.h6
2 files changed, 9 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 320a79f6d..12b468ca0 100644
--- a/Makefile
+++ b/Makefile
@@ -360,7 +360,10 @@ CDEFS += -DBEOS
LDFLAGS += -lmidi -lbe
ifdef WITH_NETWORK
ifdef BEOS_NET_SERVER
- CDEFS += -DBEOS_NET_SERVER
+ CDEFS += -DBEOS_NET_SERVER
+ else
+ # Zeta needs a few more libraries than R5
+ LDFLAGS += -lbind -lsocket
endif
endif
endif
diff --git a/network_core.h b/network_core.h
index f341531de..c6a2789b6 100644
--- a/network_core.h
+++ b/network_core.h
@@ -60,7 +60,7 @@ typedef struct ifreq IFREQ;
# include <netinet/tcp.h>
# include <arpa/inet.h>
# include <net/if.h>
-# if !defined(SUNOS) && !defined(__MORPHOS__)
+# if !defined(SUNOS) && !defined(__MORPHOS__) && !defined(__BEOS__)
# include <ifaddrs.h>
// If for any reason ifaddrs.h does not exist on a system, remove define below
// and an other system will be used to fetch ips from the system
@@ -68,6 +68,10 @@ typedef struct ifreq IFREQ;
# else
# define INADDR_NONE 0xffffffff
# endif // SUNOS
+# if defined(__BEOS__) && !defined(BEOS_NET_SERVER)
+ // needed on Zeta
+# include <sys/sockio.h>
+# endif
# endif // BEOS_NET_SERVER
/* GLibc 2.1 does not support GetIfAddr() */