(svn r1847) Adjustment for MorphOS to unbreak the build there and removal of some now obsolete preprocessor magic
authortron
Tue, 08 Feb 2005 15:42:28 +0000
changeset 1343 481847e32573
parent 1342 a1ca3e1df6bd
child 1344 53e040e3990d
(svn r1847) Adjustment for MorphOS to unbreak the build there and removal of some now obsolete preprocessor magic
network_core.h
network_udp.c
--- a/network_core.h	Mon Feb 07 20:36:41 2005 +0000
+++ b/network_core.h	Tue Feb 08 15:42:28 2005 +0000
@@ -120,6 +120,7 @@
 #	if defined(__MORPHOS__)
 #		include <sys/filio.h> 	// FIO* defines
 #		include <sys/sockio.h>  // SIO* defines
+#		include <netinet/in.h>
 #	else // __AMIGA__
 #		include	<proto/socket.h>
 #	endif
@@ -131,6 +132,7 @@
 #	define ioctl ioctlsocket
 
 	typedef unsigned int in_addr_t;
+	typedef long         socklen_t;
 	extern struct Library *SocketBase;
 
 #	ifdef __AMIGA__
--- a/network_udp.c	Mon Feb 07 20:36:41 2005 +0000
+++ b/network_udp.c	Tue Feb 08 15:42:28 2005 +0000
@@ -402,11 +402,7 @@
 void NetworkUDPReceive(SOCKET udp)
 {
 	struct sockaddr_in client_addr;
-#ifndef __MORPHOS__
-	int client_len;
-#else
-	LONG client_len; // for some reason we need a 'LONG' under MorphOS
-#endif
+	socklen_t client_len;
 	int nbytes;
 	static Packet *p = NULL;
 	int packet_len;