Merge pull request #209 from daichifukui/dfukui/allow-build-on-hurd-i386

allow build on hurd i386
This commit is contained in:
Lee Salzman 2022-10-11 00:08:04 -04:00 committed by GitHub
commit b06d154579
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

4
unix.c
View file

@ -148,7 +148,7 @@ enet_address_set_host (ENetAddress * address, const char * name)
char buffer [2048]; char buffer [2048];
int errnum; int errnum;
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) #if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__GNU__)
gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum); gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum);
#else #else
hostEntry = gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & errnum); hostEntry = gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & errnum);
@ -220,7 +220,7 @@ enet_address_get_host (const ENetAddress * address, char * name, size_t nameLeng
in.s_addr = address -> host; in.s_addr = address -> host;
#if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) #if defined(linux) || defined(__linux) || defined(__linux__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__GNU__)
gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum); gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & hostEntry, & errnum);
#else #else
hostEntry = gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & errnum); hostEntry = gethostbyaddr_r ((char *) & in, sizeof (struct in_addr), AF_INET, & hostData, buffer, sizeof (buffer), & errnum);