aboutsummaryrefslogtreecommitdiffhomepage
path: root/unix.c
diff options
context:
space:
mode:
authoreihrul <eihrul>2009-11-13 03:18:21 +0000
committereihrul <eihrul>2009-11-13 03:18:21 +0000
commit83bf2ead38100237d5435bfefa7d2854bd7255b9 (patch)
treee1ddf0f234d023f87f527a5cf47cfafa179ebb82 /unix.c
parent0190653095f2a9d200514d6f33e65aaffc4d932d (diff)
downloadenet-83bf2ead38100237d5435bfefa7d2854bd7255b9.tar.gz
enet-83bf2ead38100237d5435bfefa7d2854bd7255b9.zip
more permissive linux check
Diffstat (limited to 'unix.c')
-rw-r--r--unix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/unix.c b/unix.c
index 1ccdc4c..2a9ef04 100644
--- a/unix.c
+++ b/unix.c
@@ -80,7 +80,7 @@ enet_address_set_host (ENetAddress * address, const char * name)
char buffer [2048];
int errnum;
-#if defined(linux) || defined(__FreeBSD__)
+#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__)
gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum);
#else
hostEntry = gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & errnum);
@@ -133,7 +133,7 @@ enet_address_get_host (const ENetAddress * address, char * name, size_t nameLeng
in.s_addr = address -> host;
-#if defined(linux) || defined(__FreeBSD__)
+#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__)
gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum);
#else
hostEntry = gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & errnum);