// under MSW getxxxbyname() functions are MT-safe (but not reentrant) so
// we don't need to serialize calls to them
// under MSW getxxxbyname() functions are MT-safe (but not reentrant) so
// we don't need to serialize calls to them
#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;