summaryrefslogtreecommitdiff
path: root/network_core.h
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-23 19:23:56 +0000
committertruelight <truelight@openttd.org>2004-12-23 19:23:56 +0000
commitef32da999c04894b1c9c8c9f80eafba095a0e76d (patch)
tree1edc301404fd97e177c6ad811e578537bcc06650 /network_core.h
parent1fa1a391dca551394dc9812d674b3406a6192e1f (diff)
downloadopenttd-ef32da999c04894b1c9c8c9f80eafba095a0e76d.tar.xz
(svn r1259) -Fix: [Network] Network now compiles with glibc 2.1 (MacBaine)
Diffstat (limited to 'network_core.h')
-rw-r--r--network_core.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/network_core.h b/network_core.h
index 49c290eb1..c426b1957 100644
--- a/network_core.h
+++ b/network_core.h
@@ -61,6 +61,13 @@ typedef struct ifreq IFREQ;
# define INADDR_NONE 0xffffffff
# endif // SUNOS
# endif // BEOS_NET_SERVER
+
+/* GLibc 2.1 does not support GetIfAddr() */
+# if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 1)
+# undef HAVE_GETIFADDRS
+ typedef uint32_t in_addr_t;
+# endif /* __GLIBC__ && (__GLIBC__ == 2) && (__GLIBC_MINOR__ == 1) */
+
# include <errno.h>
# include <sys/time.h>
# include <netdb.h>