Lines 1-15
Link Here
|
1 |
--- src/bsdnss.c.orig 2008-04-30 02:40:37.000000000 +0530 |
1 |
--- src/bsdnss.c.orig 2007-02-08 16:42:23.000000000 +0000 |
2 |
+++ src/bsdnss.c 2008-04-30 02:43:11.000000000 +0530 |
2 |
+++ src/bsdnss.c 2008-10-07 23:38:41.000000000 +0100 |
3 |
@@ -56,7 +56,7 @@ |
3 |
@@ -45,6 +45,7 @@ |
4 |
#if defined(NSS_IPV4_ONLY) || defined(NSS_IPV6_ONLY) |
4 |
#include <netinet/in.h> |
5 |
/* |
5 |
#include <netdb.h> |
6 |
* FreeBSD's libc is always built with IPv4 support. |
6 |
|
7 |
- * There is no way of telling at compile time with a define if libc |
7 |
+#include "nss_gethostname_select.h" |
8 |
+ * Therxe is no way of telling at compile time with a define if libc |
8 |
#include "config.h" |
9 |
* was built with -DINET6 or not; a configure test would be required. |
9 |
|
10 |
* Therefore, distinguishing between the two makes no sense. |
10 |
#ifdef MDNS_MINIMAL |
11 |
*/ |
11 |
@@ -80,37 +81,6 @@ |
12 |
@@ -219,22 +219,8 @@ |
12 |
ns_mtab *nss_module_register(const char *source, unsigned int *mtabsize, |
|
|
13 |
nss_module_unregister_fn *unreg); |
14 |
|
15 |
-extern enum nss_status _nss_mdns_gethostbyname_r (const char *name, struct hostent * result, |
16 |
- char *buffer, size_t buflen, int *errnop, |
17 |
- int *h_errnop); |
18 |
- |
19 |
-extern enum nss_status _nss_mdns_gethostbyname2_r (const char *name, int af, struct hostent * result, |
20 |
- char *buffer, size_t buflen, int *errnop, |
21 |
- int *h_errnop); |
22 |
-extern enum nss_status _nss_mdns_gethostbyaddr_r (struct in_addr * addr, int len, int type, |
23 |
- struct hostent * result, char *buffer, |
24 |
- size_t buflen, int *errnop, int *h_errnop); |
25 |
-extern enum nss_status _nss_mdns4_gethostbyname_r (const char *name, struct hostent * result, |
26 |
- char *buffer, size_t buflen, int *errnop, |
27 |
- int *h_errnop); |
28 |
- |
29 |
-extern enum nss_status _nss_mdns4_gethostbyname2_r (const char *name, int af, struct hostent * result, |
30 |
- char *buffer, size_t buflen, int *errnop, |
31 |
- int *h_errnop); |
32 |
-extern enum nss_status _nss_mdns4_gethostbyaddr_r (struct in_addr * addr, int len, int type, |
33 |
- struct hostent * result, char *buffer, |
34 |
- size_t buflen, int *errnop, int *h_errnop); |
35 |
-extern enum nss_status _nss_mdns6_gethostbyname_r (const char *name, struct hostent * result, |
36 |
- char *buffer, size_t buflen, int *errnop, |
37 |
- int *h_errnop); |
38 |
- |
39 |
-extern enum nss_status _nss_mdns6_gethostbyname2_r (const char *name, int af, struct hostent * result, |
40 |
- char *buffer, size_t buflen, int *errnop, |
41 |
- int *h_errnop); |
42 |
-extern enum nss_status _nss_mdns6_gethostbyaddr_r (struct in_addr * addr, int len, int type, |
43 |
- struct hostent * result, char *buffer, |
44 |
- size_t buflen, int *errnop, int *h_errnop); |
45 |
- |
46 |
typedef enum nss_status (*_bsd_nsstub_fn_t)(const char *, struct hostent *, char *, size_t, int *, int *); |
47 |
|
48 |
/* XXX: FreeBSD 5.x is not supported. */ |
49 |
@@ -219,22 +189,8 @@ |
13 |
* 2. Map hostent to addrinfo. |
50 |
* 2. Map hostent to addrinfo. |
14 |
* 3. Hand-off buffer to libc. |
51 |
* 3. Hand-off buffer to libc. |
15 |
*/ |
52 |
*/ |
Lines 30-36
Link Here
|
30 |
- break; |
67 |
- break; |
31 |
- } |
68 |
- } |
32 |
+ status = _nss_mdns_gethostbyname2_r(name, pai->ai_family, hp, buffer, |
69 |
+ status = _nss_mdns_gethostbyname2_r(name, pai->ai_family, hp, buffer, |
33 |
+ mbuflen, &_errno, &_h_errno); |
70 |
+ mbuflen, &_errno, &_h_errno); |
34 |
status = __nss_compat_result(status, _errno); |
71 |
status = __nss_compat_result(status, _errno); |
35 |
|
72 |
|
36 |
if (status == NS_SUCCESS) { |
73 |
if (status == NS_SUCCESS) { |