git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59023
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
typedef char wxGetservBuf[1024];
#endif
typedef char wxGetservBuf[1024];
#endif
-#if defined(wxHAS_MT_SAFE_GETBY_FUNCS) || !wxUSE_THREADS
+#ifdef wxHAS_MT_SAFE_GETBY_FUNCS
#define wxLOCK_GETBY_MUTEX(name)
#else // may need mutexes to protect getxxxbyxxx() calls
#if defined(HAVE_GETHOSTBYNAME) || \
#define wxLOCK_GETBY_MUTEX(name)
#else // may need mutexes to protect getxxxbyxxx() calls
#if defined(HAVE_GETHOSTBYNAME) || \
#elif defined(HAVE_FUNC_GETSERVBYNAME_R_5)
se = getservbyname_r(port, protocol, serv, buffer, size);
#elif defined(HAVE_FUNC_GETSERVBYNAME_R_4)
#elif defined(HAVE_FUNC_GETSERVBYNAME_R_5)
se = getservbyname_r(port, protocol, serv, buffer, size);
#elif defined(HAVE_FUNC_GETSERVBYNAME_R_4)
- se = getservbyname_r(port, protocol, serv, &buffer);
+ if ( getservbyname_r(port, protocol, serv, &buffer) != 0 )
+ return NULL;
#elif defined(HAVE_GETSERVBYNAME)
wxLOCK_GETBY_MUTEX(serv);
#elif defined(HAVE_GETSERVBYNAME)
wxLOCK_GETBY_MUTEX(serv);