|
|
8597553 |
commit 44f28da7cab271b659551c4fe1a7d2e420803576
|
|
|
8597553 |
Author: Florian Weimer <fweimer@redhat.com>
|
|
|
8597553 |
Date: Tue Apr 4 14:36:02 2017 +0200
|
|
|
8597553 |
|
|
|
8597553 |
nss_dns: Replace local declarations with declarations from a header file
|
|
|
8597553 |
|
|
|
8597553 |
diff --git a/include/arpa/nameser.h b/include/arpa/nameser.h
|
|
|
8597553 |
index cd7ab6e925b25687..7a8290e1f26070e0 100644
|
|
|
8597553 |
--- a/include/arpa/nameser.h
|
|
|
8597553 |
+++ b/include/arpa/nameser.h
|
|
|
8597553 |
@@ -51,6 +51,9 @@ extern const struct _ns_flagdata _ns_flagdata[] attribute_hidden;
|
|
|
8597553 |
|
|
|
8597553 |
extern unsigned int __ns_get16 (const unsigned char *) __THROW;
|
|
|
8597553 |
extern unsigned long __ns_get32 (const unsigned char *) __THROW;
|
|
|
8597553 |
+int __ns_name_ntop (const unsigned char *, char *, size_t) __THROW;
|
|
|
8597553 |
+int __ns_name_unpack (const unsigned char *, const unsigned char *,
|
|
|
8597553 |
+ const unsigned char *, unsigned char *, size_t) __THROW;
|
|
|
8597553 |
|
|
|
8597553 |
#define ns_msg_getflag(handle, flag) \
|
|
|
8597553 |
(((handle)._flags & _ns_flagdata[flag].mask) >> _ns_flagdata[flag].shift)
|
|
|
8597553 |
diff --git a/resolv/nss_dns/dns-host.c b/resolv/nss_dns/dns-host.c
|
|
|
8597553 |
index 01864dc96e639873..705b3c9c078c41bf 100644
|
|
|
8597553 |
--- a/resolv/nss_dns/dns-host.c
|
|
|
8597553 |
+++ b/resolv/nss_dns/dns-host.c
|
|
|
8597553 |
@@ -80,6 +80,7 @@
|
|
|
8597553 |
#include <string.h>
|
|
|
8597553 |
|
|
|
8597553 |
#include "nsswitch.h"
|
|
|
8597553 |
+#include <arpa/nameser.h>
|
|
|
8597553 |
|
|
|
8597553 |
/* Get implementeation for some internal functions. */
|
|
|
8597553 |
#include <resolv/resolv-internal.h>
|
|
|
8597553 |
@@ -106,13 +107,6 @@ typedef union querybuf
|
|
|
8597553 |
u_char buf[MAXPACKET];
|
|
|
8597553 |
} querybuf;
|
|
|
8597553 |
|
|
|
8597553 |
-/* These functions are defined in res_comp.c. */
|
|
|
8597553 |
-#define NS_MAXCDNAME 255 /* maximum compressed domain name */
|
|
|
8597553 |
-extern int __ns_name_ntop (const u_char *, char *, size_t);
|
|
|
8597553 |
-extern int __ns_name_unpack (const u_char *, const u_char *,
|
|
|
8597553 |
- const u_char *, u_char *, size_t);
|
|
|
8597553 |
-
|
|
|
8597553 |
-
|
|
|
8597553 |
static enum nss_status getanswer_r (const querybuf *answer, int anslen,
|
|
|
8597553 |
const char *qname, int qtype,
|
|
|
8597553 |
struct hostent *result, char *buffer,
|
|
|
8597553 |
diff --git a/resolv/nss_dns/dns-network.c b/resolv/nss_dns/dns-network.c
|
|
|
8597553 |
index fd8c5656c0cedd27..2be72d33a30f917e 100644
|
|
|
8597553 |
--- a/resolv/nss_dns/dns-network.c
|
|
|
8597553 |
+++ b/resolv/nss_dns/dns-network.c
|
|
|
8597553 |
@@ -66,6 +66,7 @@
|
|
|
8597553 |
|
|
|
8597553 |
#include "nsswitch.h"
|
|
|
8597553 |
#include <arpa/inet.h>
|
|
|
8597553 |
+#include <arpa/nameser.h>
|
|
|
8597553 |
|
|
|
8597553 |
/* Maximum number of aliases we allow. */
|
|
|
8597553 |
#define MAX_NR_ALIASES 48
|
|
|
8597553 |
@@ -92,13 +93,6 @@ typedef union querybuf
|
|
|
8597553 |
u_char buf[MAXPACKET];
|
|
|
8597553 |
} querybuf;
|
|
|
8597553 |
|
|
|
8597553 |
-/* These functions are defined in res_comp.c. */
|
|
|
8597553 |
-#define NS_MAXCDNAME 255 /* maximum compressed domain name */
|
|
|
8597553 |
-extern int __ns_name_ntop (const u_char *, char *, size_t) __THROW;
|
|
|
8597553 |
-extern int __ns_name_unpack (const u_char *, const u_char *,
|
|
|
8597553 |
- const u_char *, u_char *, size_t) __THROW;
|
|
|
8597553 |
-
|
|
|
8597553 |
-
|
|
|
8597553 |
/* Prototypes for local functions. */
|
|
|
8597553 |
static enum nss_status getanswer_r (const querybuf *answer, int anslen,
|
|
|
8597553 |
struct netent *result, char *buffer,
|