(svn r3023) -Fix [BeOS] fixed compilation on BeOS R5 (MYOB)
authorbjarni
Thu, 06 Oct 2005 18:28:27 +0000
changeset 2497 1c8460570c0d
parent 2496 ad131afbc8cb
child 2498 befad2fe53d2
(svn r3023) -Fix [BeOS] fixed compilation on BeOS R5 (MYOB)
Makefile
network_udp.c
video/dedicated_v.c
--- a/Makefile	Thu Oct 06 17:57:18 2005 +0000
+++ b/Makefile	Thu Oct 06 18:28:27 2005 +0000
@@ -380,12 +380,13 @@
 
 ifdef BEOS
 CDEFS += -DBEOS
-LDFLAGS += -lmidi -lbe
+LDFLAGS += -lmidi -lbe -lpthread
 ifdef WITH_NETWORK
 	ifdef BEOS_NET_SERVER
 		CDEFS += -DBEOS_NET_SERVER
+		LDFLAGS += -lnet
 	else
-		# Zeta needs a few more libraries than R5
+		# BONE needs a few more libraries than R5
 		LDFLAGS += -lbind -lsocket
 	endif
 endif
--- a/network_udp.c	Thu Oct 06 17:57:18 2005 +0000
+++ b/network_udp.c	Thu Oct 06 18:28:27 2005 +0000
@@ -350,7 +350,11 @@
 	// set nonblocking mode for socket
 	{
 		unsigned long blocking = 1;
+#ifndef BEOS_NET_SERVER
 		ioctlsocket(*udp, FIONBIO, &blocking);
+#else
+		setsockopt(*upd, SOL_SOCKET, SO_NONBLOCK, &blocking);
+#endif
 	}
 
 	sin.sin_family = AF_INET;
@@ -366,7 +370,9 @@
 	if (broadcast) {
 		/* Enable broadcast */
 		unsigned long val = 1;
+#ifndef BEOS_NET_SERVER // will work around this, some day; maybe.
 		setsockopt(*udp, SOL_SOCKET, SO_BROADCAST, (char *) &val , sizeof(val));
+#endif
 	}
 
 	DEBUG(net, 1)("[NET][UDP] Listening on port %s:%d", inet_ntoa(*(struct in_addr *)&host), port);
--- a/video/dedicated_v.c	Thu Oct 06 17:57:18 2005 +0000
+++ b/video/dedicated_v.c	Thu Oct 06 18:28:27 2005 +0000
@@ -15,6 +15,10 @@
 #include "../variables.h"
 #include "dedicated_v.h"
 
+#ifdef BEOS_NET_SERVER
+#include <net/socket.h>
+#endif
+
 #ifdef __OS2__
 #	include <sys/time.h> /* gettimeofday */
 #	include <sys/types.h>