#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
+#include <arpa/inet.h>
#include <arpa/nameser.h>
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
#include <arpa/nameser_compat.h>
#include <net/if.h>
#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
else
{
struct servent *se;
- char *proto;
+ const char *proto;
if (flags & ARES_NI_UDP)
proto = "udp";
c2++;
}
}
- if (c2 == c1 == NULL)
+ if (c2 == c1 && c2 == NULL)
return (char *)c1_begin;
return NULL;
}