summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/getnetbynis.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/net/getnetbynis.c')
-rw-r--r--lib/libc/net/getnetbynis.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/net/getnetbynis.c b/lib/libc/net/getnetbynis.c
index 200e7a4..ea7c3d4 100644
--- a/lib/libc/net/getnetbynis.c
+++ b/lib/libc/net/getnetbynis.c
@@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$");
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
+#include <resolv.h>
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
@@ -88,7 +89,7 @@ _getnetbynis(const char *name, char *map, int af, struct netent *ne,
ep = ned->netbuf + sizeof ned->netbuf;
len = strlen(result) + 1;
if (ep - bp < len) {
- h_errno = NO_RECOVERY;
+ RES_SET_H_ERRNO(__res_state(), NO_RECOVERY);
return -1;
}
strlcpy(bp, result, ep - bp);
OpenPOWER on IntegriCloud