Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Sep 2015 04:20:31 +0000 (UTC)
From:      Craig Rodrigues <rodrigc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r288015 - head/lib/libc/net
Message-ID:  <201509200420.t8K4KVne078177@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rodrigc
Date: Sun Sep 20 04:20:31 2015
New Revision: 288015
URL: https://svnweb.freebsd.org/changeset/base/288015

Log:
  Add declarations to netdb_private.h to eliminate -Wmissing-prototypes warnings.

Modified:
  head/lib/libc/net/gethostnamadr.c
  head/lib/libc/net/getnetnamadr.c
  head/lib/libc/net/getproto.c
  head/lib/libc/net/map_v4v6.c
  head/lib/libc/net/netdb_private.h

Modified: head/lib/libc/net/gethostnamadr.c
==============================================================================
--- head/lib/libc/net/gethostnamadr.c	Sun Sep 20 04:17:53 2015	(r288014)
+++ head/lib/libc/net/gethostnamadr.c	Sun Sep 20 04:20:31 2015	(r288015)
@@ -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);
 

Modified: head/lib/libc/net/getnetnamadr.c
==============================================================================
--- head/lib/libc/net/getnetnamadr.c	Sun Sep 20 04:17:53 2015	(r288014)
+++ head/lib/libc/net/getnetnamadr.c	Sun Sep 20 04:20:31 2015	(r288015)
@@ -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 },

Modified: head/lib/libc/net/getproto.c
==============================================================================
--- head/lib/libc/net/getproto.c	Sun Sep 20 04:17:53 2015	(r288014)
+++ head/lib/libc/net/getproto.c	Sun Sep 20 04:20:31 2015	(r288015)
@@ -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)
 {

Modified: head/lib/libc/net/map_v4v6.c
==============================================================================
--- head/lib/libc/net/map_v4v6.c	Sun Sep 20 04:17:53 2015	(r288014)
+++ head/lib/libc/net/map_v4v6.c	Sun Sep 20 04:20:31 2015	(r288015)
@@ -68,6 +68,7 @@ __FBSDID("$FreeBSD$");
 #include <resolv.h>
 #include <ctype.h>
 #include <syslog.h>
+#include "netdb_private.h"
 
 typedef union {
 	int32_t al;

Modified: head/lib/libc/net/netdb_private.h
==============================================================================
--- head/lib/libc/net/netdb_private.h	Sun Sep 20 04:17:53 2015	(r288014)
+++ head/lib/libc/net/netdb_private.h	Sun Sep 20 04:20:31 2015	(r288015)
@@ -142,4 +142,23 @@ void _sethosthtent(int, struct hostent_d
 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_ */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201509200420.t8K4KVne078177>