#include <errno.h>
#include <string.h>
+#ifndef h_errno
extern int h_errno;
+#endif
-#if defined(mips) && defined(SYSTYPE_BSD43)
+#if defined(mips) && defined(SYSTYPE_BSD43) && !defined(errno)
extern int errno;
#endif
cp = answer->buf + HFIXEDSZ;
if (!qdcount) {
if (hp->aa)
- h_errno = HOST_NOT_FOUND;
+ __set_h_errno (HOST_NOT_FOUND);
else
- h_errno = TRY_AGAIN;
+ __set_h_errno (TRY_AGAIN);
return (NULL);
}
while (qdcount-- > 0)
net_entry.n_aliases++;
return (&net_entry);
}
- h_errno = TRY_AGAIN;
+ __set_h_errno (TRY_AGAIN);
return (NULL);
}
struct netent *net_entry;
if ((_res.options & RES_INIT) == 0 && res_init() == -1) {
- h_errno = NETDB_INTERNAL;
+ __set_h_errno (NETDB_INTERNAL);
return (NULL);
}
strcpy(&qbuf[0], net);