Also store the "result"-value from "gethostbyname_r" on NetBSD and OpenBSD.
This patch is from NetBSD's pkgsrc. (I'm not the author of it and not really sure who is.)
Logged In: YES user_id=205
argh! somehow SourceForge screwed this one up... So, I just copy&paste the diff here: --- src/UDPSocket.cpp.orig 2003-04-01 17:26:21.000000000 +0200 +++ src/UDPSocket.cpp @@ -24,7 +24,7 @@
static pthread_attr_t attr;//=PTHREAD_CREATE_DETACHED;
-#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) static wxMutex *s_mutexProtectingGetHostByName;
static int @@ -169,7 +169,7 @@ wxThread::ExitCode AsyncDNS::Entry() int errorno=0; char dataBuf[512]={0};
-#ifdef __FreeBSD__ +#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) result = gethostbyname_r(ipName.GetData(),&ret,dataBuf,sizeof(dataBuf),&errorno); #else
gethostbyname_r(ipName.GetData(),&ret,dataBuf,sizeof(dataBuf),&result,&errorno);
Log in to post a comment.
Logged In: YES
user_id=205
argh! somehow SourceForge screwed this one up... So, I just
copy&paste the diff here:
--- src/UDPSocket.cpp.orig 2003-04-01 17:26:21.000000000
+0200
+++ src/UDPSocket.cpp
@@ -24,7 +24,7 @@
static pthread_attr_t attr;//=PTHREAD_CREATE_DETACHED;
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__OpenBSD__) ||
defined(__NetBSD__)
static wxMutex *s_mutexProtectingGetHostByName;
static int
@@ -169,7 +169,7 @@ wxThread::ExitCode AsyncDNS::Entry()
int errorno=0;
char dataBuf[512]={0};
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__OpenBSD__) ||
defined(__NetBSD__)
result =
gethostbyname_r(ipName.GetData(),&ret,dataBuf,sizeof(dataBuf),&errorno);
#else
gethostbyname_r(ipName.GetData(),&ret,dataBuf,sizeof(dataBuf),&result,&errorno);