enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Enigma-devel] Debian Bug #401519 - gethostbyname_r


From: Ronald Lamprecht
Subject: [Enigma-devel] Debian Bug #401519 - gethostbyname_r
Date: Tue, 05 Dec 2006 23:49:29 +0100
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

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);

reply via email to

[Prev in Thread] Current Thread [Next in Thread]