Hi,

The following patch has been posted to Debian buglist concerning enet "gethostbyname_r" compilation problems on GNU/kFreeBSD.

The code fragments are included in "#ifdef HAS_GETHOSTBYNAME_R".

Does anybody sees any bad sideaffects of the patch? Otherwise I would include it in the developement trunk for 1.00.

- Ronald

Index: lib-src/enet/unix.c
===================================================================
--- lib-src/enet/unix.c (revision 497)
+++ lib-src/enet/unix.c (working copy)
@@ -80,7 +80,7 @@
     char buffer [2048];
     int errnum;
 
-#ifdef linux
+#if defined(linux) || defined(__GLIBC__) || defined(__GNU__)
     gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & hostEntry, & 
errnum);
 #else
     hostEntry = gethostbyname_r (name, & hostData, buffer, sizeof (buffer), & 
errnum);
@@ -118,7 +118,7 @@
 
     in.s_addr = address -> host;
 
-#ifdef linux
+#if defined(linux) || defined(__GLIBC__) || defined(__GNU__)
     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);
_______________________________________________
Enigma-devel mailing list
Enigma-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/enigma-devel

Reply via email to