summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/getnetbynis.c
diff options
context:
space:
mode:
authorume <ume@FreeBSD.org>2006-03-21 16:11:11 +0000
committerume <ume@FreeBSD.org>2006-03-21 16:11:11 +0000
commitb09a8950a1301d97aef8e2975e34a3ba5bc451c3 (patch)
treee821dd9b60869dd20f6817bbe100b41cd574f673 /lib/libc/net/getnetbynis.c
parenta2c94cecc033518580f28713e669d3f2a7783306 (diff)
downloadFreeBSD-src-b09a8950a1301d97aef8e2975e34a3ba5bc451c3.zip
FreeBSD-src-b09a8950a1301d97aef8e2975e34a3ba5bc451c3.tar.gz
Update the resolver in libc to BIND9's one.
Since, res_sendsigned(3) and the friends use MD5 functions, it is hard to include them without having MD5 functions in libc. So, res_sendsigned(3) is not merged into libc. Since, res_update(3) in BIND9 is not binary compatible with our res_update(3), res_update(3) is leaved as is, except some necessary modifications. The res_update(3) and the friends are not essential part of the resolver. They are not defined in resolv.h but defined in res_update.h separately in BIND9. Further, they are not called from our tree. So, I hide them from our resolv.h, but leave them only for binary backward compatibility (perhaps, no one calls them). Since, struct __res_state_ext is not exposed in BIND9, I hide it from our resolv.h. And, global variable _res_ext is removed. It breaks binary backward compatibility. But, since it is not used from outside of our libc, I think it is safe. Reviewed by: arch@ (no objection)
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