mirror of
https://github.com/moparisthebest/curl
synced 2025-03-11 15:50:48 -04:00
avoid doing #if an a predef symbol that might not be defined
This commit is contained in:
parent
afc2aa2b3f
commit
b55506a76d
@ -263,6 +263,7 @@ static char *lookup_service(unsigned short port, int flags,
|
|||||||
{
|
{
|
||||||
struct servent *se;
|
struct servent *se;
|
||||||
const char *proto;
|
const char *proto;
|
||||||
|
#ifdef HAVE_GETSERVBYPORT_R
|
||||||
#if GETSERVBYPORT_R_ARGS == 6
|
#if GETSERVBYPORT_R_ARGS == 6
|
||||||
struct servent ret;
|
struct servent ret;
|
||||||
char buf[4096];
|
char buf[4096];
|
||||||
@ -274,6 +275,7 @@ static char *lookup_service(unsigned short port, int flags,
|
|||||||
struct servent ret;
|
struct servent ret;
|
||||||
struct servent_data sed;
|
struct servent_data sed;
|
||||||
#endif
|
#endif
|
||||||
|
#endif /* HAVE_GETSERVBYPORT_R */
|
||||||
if (flags & ARES_NI_UDP)
|
if (flags & ARES_NI_UDP)
|
||||||
proto = "udp";
|
proto = "udp";
|
||||||
else if (flags & ARES_NI_SCTP)
|
else if (flags & ARES_NI_SCTP)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user