Skip to content

Commit

Permalink
gethostbyname_r/gethostbyaddr_r fix for dragonfly bsd
Browse files Browse the repository at this point in the history
  • Loading branch information
lsalzman committed Feb 14, 2015
1 parent b574c94 commit 8df6e58
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8df6e58

Please sign in to comment.