From f7aca4b6732b0fec7e07f68e00a786539595cea1 Mon Sep 17 00:00:00 2001 From: rodrigc Date: Sun, 20 Sep 2015 04:20:31 +0000 Subject: Add declarations to netdb_private.h to eliminate -Wmissing-prototypes warnings. --- lib/libc/net/gethostnamadr.c | 7 ------- lib/libc/net/getnetnamadr.c | 7 ------- lib/libc/net/getproto.c | 6 ------ lib/libc/net/map_v4v6.c | 1 + lib/libc/net/netdb_private.h | 19 +++++++++++++++++++ 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c index 2dc9d02..6bbe270 100644 --- a/lib/libc/net/gethostnamadr.c +++ b/lib/libc/net/gethostnamadr.c @@ -48,13 +48,6 @@ __FBSDID("$FreeBSD$"); #include "nscache.h" #endif -extern int _ht_gethostbyname(void *, void *, va_list); -extern int _dns_gethostbyname(void *, void *, va_list); -extern int _nis_gethostbyname(void *, void *, va_list); -extern int _ht_gethostbyaddr(void *, void *, va_list); -extern int _dns_gethostbyaddr(void *, void *, va_list); -extern int _nis_gethostbyaddr(void *, void *, va_list); - static int gethostbyname_internal(const char *, int, struct hostent *, char *, size_t, struct hostent **, int *, res_state); diff --git a/lib/libc/net/getnetnamadr.c b/lib/libc/net/getnetnamadr.c index 9aa4d51..4d2fb38 100644 --- a/lib/libc/net/getnetnamadr.c +++ b/lib/libc/net/getnetnamadr.c @@ -46,13 +46,6 @@ __FBSDID("$FreeBSD$"); #include "nscache.h" #endif -extern int _ht_getnetbyname(void *, void *, va_list); -extern int _dns_getnetbyname(void *, void *, va_list); -extern int _nis_getnetbyname(void *, void *, va_list); -extern int _ht_getnetbyaddr(void *, void *, va_list); -extern int _dns_getnetbyaddr(void *, void *, va_list); -extern int _nis_getnetbyaddr(void *, void *, va_list); - /* Network lookup order if nsswitch.conf is broken or nonexistant */ static const ns_src default_src[] = { { NSSRC_FILES, NS_SUCCESS }, diff --git a/lib/libc/net/getproto.c b/lib/libc/net/getproto.c index b923edf..36eeb90 100644 --- a/lib/libc/net/getproto.c +++ b/lib/libc/net/getproto.c @@ -47,12 +47,6 @@ static const ns_src defaultsrc[] = { { NULL, 0 } }; -#ifdef NS_CACHING -extern int __proto_id_func(char *, size_t *, va_list, void *); -extern int __proto_marshal_func(char *, size_t *, void *, va_list, void *); -extern int __proto_unmarshal_func(char *, size_t, void *, va_list, void *); -#endif - static int files_getprotobynumber(void *retval, void *mdata, va_list ap) { diff --git a/lib/libc/net/map_v4v6.c b/lib/libc/net/map_v4v6.c index dbc7e70..09b035b 100644 --- a/lib/libc/net/map_v4v6.c +++ b/lib/libc/net/map_v4v6.c @@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include "netdb_private.h" typedef union { int32_t al; diff --git a/lib/libc/net/netdb_private.h b/lib/libc/net/netdb_private.h index b48dd7b..0eedb3c 100644 --- a/lib/libc/net/netdb_private.h +++ b/lib/libc/net/netdb_private.h @@ -142,4 +142,23 @@ void _sethosthtent(int, struct hostent_data *); void _setnetdnsent(int); void _setnethtent(int, struct netent_data *); +struct hostent *__dns_getanswer(const char *, int, const char *, int); +int _dns_gethostbyaddr(void *, void *, va_list); +int _dns_gethostbyname(void *, void *, va_list); +int _dns_getnetbyaddr(void *, void *, va_list); +int _dns_getnetbyname(void *, void *, va_list); +int _ht_gethostbyaddr(void *, void *, va_list); +int _ht_gethostbyname(void *, void *, va_list); +int _ht_getnetbyaddr(void *, void *, va_list); +int _ht_getnetbyname(void *, void *, va_list); +int _nis_gethostbyaddr(void *, void *, va_list); +int _nis_gethostbyname(void *, void *, va_list); +int _nis_getnetbyaddr(void *, void *, va_list); +int _nis_getnetbyname(void *, void *, va_list); +#ifdef NS_CACHING +int __proto_id_func(char *, size_t *, va_list, void *); +int __proto_marshal_func(char *, size_t *, void *, va_list, void *); +int __proto_unmarshal_func(char *, size_t, void *, va_list, void *); +#endif + #endif /* _NETDB_PRIVATE_H_ */ -- cgit v1.1