summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-02-08 15:42:28 +0000
committertron <tron@openttd.org>2005-02-08 15:42:28 +0000
commitdcc381bf5caf7be6e27f7bc12f8febaf200b802b (patch)
tree6027ee379a895993bb6c5ea26af6c5d3a585fee3
parenta5ece2577793e7ec13a537cc7826571a65d7b93e (diff)
downloadopenttd-dcc381bf5caf7be6e27f7bc12f8febaf200b802b.tar.xz
(svn r1847) Adjustment for MorphOS to unbreak the build there and removal of some now obsolete preprocessor magic
-rw-r--r--network_core.h2
-rw-r--r--network_udp.c6
2 files changed, 3 insertions, 5 deletions
diff --git a/network_core.h b/network_core.h
index 304f580a8..ef2d89a70 100644
--- a/network_core.h
+++ b/network_core.h
@@ -120,6 +120,7 @@ typedef unsigned long in_addr_t;
# 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 @@ typedef unsigned long in_addr_t;
# define ioctl ioctlsocket
typedef unsigned int in_addr_t;
+ typedef long socklen_t;
extern struct Library *SocketBase;
# ifdef __AMIGA__
diff --git a/network_udp.c b/network_udp.c
index 6d8d051b8..885ee1045 100644
--- a/network_udp.c
+++ b/network_udp.c
@@ -402,11 +402,7 @@ void NetworkUDPClose(void)
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;