about summary refs log tree commit diff
path: root/src/network
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2018-09-07 15:51:00 -0400
committerRich Felker <dalias@aerifal.cx>2018-09-12 14:34:29 -0400
commitc98bf5b8691b21373ff8d9698e89a75acdefdc75 (patch)
treed0b441e7e10c892e785a676e6ecd4450e3477fd5 /src/network
parent59d88940d20b40495c9d63560469b3a1ee5c8bc6 (diff)
downloadmusl-c98bf5b8691b21373ff8d9698e89a75acdefdc75.tar.gz
musl-c98bf5b8691b21373ff8d9698e89a75acdefdc75.tar.xz
musl-c98bf5b8691b21373ff8d9698e89a75acdefdc75.zip
move and deduplicate declarations of __dns_parse to make it checkable
the source file for this function is completely standalone, but it
doesn't seem worth adding a header just for it, so declare it in
lookup.h for now.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/dns_parse.c1
-rw-r--r--src/network/getnameinfo.c1
-rw-r--r--src/network/lookup.h2
-rw-r--r--src/network/lookup_name.c1
4 files changed, 3 insertions, 2 deletions
diff --git a/src/network/dns_parse.c b/src/network/dns_parse.c
index 0c7a6011..e6ee19d9 100644
--- a/src/network/dns_parse.c
+++ b/src/network/dns_parse.c
@@ -1,4 +1,5 @@
 #include <string.h>
+#include "lookup.h"
 
 int __dns_parse(const unsigned char *r, int rlen, int (*callback)(void *, int, const void *, int, const void *), void *ctx)
 {
diff --git a/src/network/getnameinfo.c b/src/network/getnameinfo.c
index 5e6fae3e..79b9e6ea 100644
--- a/src/network/getnameinfo.c
+++ b/src/network/getnameinfo.c
@@ -10,7 +10,6 @@
 #include "lookup.h"
 #include "stdio_impl.h"
 
-int __dns_parse(const unsigned char *, int, int (*)(void *, int, const void *, int, const void *), void *);
 int __dn_expand(const unsigned char *, const unsigned char *, const unsigned char *, char *, int);
 int __res_mkquery(int, const char *, int, int, const unsigned char *, int, const unsigned char*, unsigned char *, int);
 int __res_send(const unsigned char *, int, unsigned char *, int);
diff --git a/src/network/lookup.h b/src/network/lookup.h
index 0468edbc..329aaa77 100644
--- a/src/network/lookup.h
+++ b/src/network/lookup.h
@@ -36,4 +36,6 @@ int __lookup_ipliteral(struct address buf[static 1], const char *name, int famil
 
 int __get_resolv_conf(struct resolvconf *, char *, size_t);
 
+int __dns_parse(const unsigned char *, int, int (*)(void *, int, const void *, int, const void *), void *);
+
 #endif
diff --git a/src/network/lookup_name.c b/src/network/lookup_name.c
index 1bce4347..71c396a8 100644
--- a/src/network/lookup_name.c
+++ b/src/network/lookup_name.c
@@ -98,7 +98,6 @@ struct dpc_ctx {
 	int cnt;
 };
 
-int __dns_parse(const unsigned char *, int, int (*)(void *, int, const void *, int, const void *), void *);
 int __dn_expand(const unsigned char *, const unsigned char *, const unsigned char *, char *, int);
 int __res_mkquery(int, const char *, int, int, const unsigned char *, int, const unsigned char*, unsigned char *, int);
 int __res_msend_rc(int, const unsigned char *const *, const int *, unsigned char *const *, int *, int, const struct resolvconf *);