aboutsummaryrefslogtreecommitdiffhomepage
path: root/unix.c
diff options
context:
space:
mode:
authorlsalzman <[email protected]>2015-02-14 07:48:49 -0800
committerlsalzman <[email protected]>2015-02-14 07:48:49 -0800
commit8df6e58c5f6852b641634df4f3009a8a4e56acfd (patch)
treee4516bd988d538727800076c6eb02f7e39e2a755 /unix.c
parentb574c946d81ed9073066fca58e4b4e879c30dc46 (diff)
downloadenet-8df6e58c5f6852b641634df4f3009a8a4e56acfd.tar.gz
enet-8df6e58c5f6852b641634df4f3009a8a4e56acfd.zip
gethostbyname_r/gethostbyaddr_r fix for dragonfly bsd
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 431d19c..19ee76f 100644
--- a/unix.c
+++ b/unix.c
@@ -104,7 +104,7 @@ enet_address_set_host (ENetAddress * address, const char * name)
char buffer [2048];
int errnum;
-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum);
#else
hostEntry = gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & errnum);
@@ -162,7 +162,7 @@ enet_address_get_host (const ENetAddress * address, char * name, size_t nameLeng
in.s_addr = address -> host;
-#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
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);