Unconditionally include <netdb.h> where needed instead of system.h
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 5 Jan 2010 09:26:14 +0000 (11:26 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 5 Jan 2010 09:26:14 +0000 (11:26 +0200)
- there's no fallback for missing netdb.h so there's little point
  conditionalizing it
- avoid yet more system.h pollution

build/names.c
configure.ac
lib/header.c
lib/rpmrc.c
rpmio/url.c
system.h
tools/javadeps.c

index 692bbe9..aea9acf 100644 (file)
@@ -7,6 +7,7 @@
 #include "system.h"
 #include <pwd.h>
 #include <grp.h>
+#include <netdb.h>
 #include <rpm/rpmbuild.h>
 #include <rpm/rpmlog.h>
 #include "debug.h"
index 5d53be5..264d8a3 100644 (file)
@@ -356,7 +356,7 @@ AC_HEADER_TIME
 
 AC_CHECK_HEADERS(locale.h)
 AC_CHECK_HEADERS(limits.h)
-AC_CHECK_HEADERS(fcntl.h getopt.h memory.h netdb.h)
+AC_CHECK_HEADERS(fcntl.h getopt.h memory.h)
 
 AC_CHECK_HEADERS(sys/ipc.h)
 AC_CHECK_HEADERS(sys/mman.h sys/utsname.h sys/wait.h)
index 5f9baeb..2cd5dd3 100644 (file)
@@ -9,7 +9,7 @@
 /* network byte order and is converted on the fly to host order. */
 
 #include "system.h"
-
+#include <netdb.h>
 #include <rpm/rpmtypes.h>
 #include <rpm/rpmstring.h>
 #include "lib/header_internal.h"
index 08df74e..cfc9332 100644 (file)
@@ -8,7 +8,7 @@
 #if HAVE_SYS_UTSNAME_H
 #include <sys/utsname.h>
 #endif
-
+#include <netdb.h>
 #include <ctype.h>     /* XXX for /etc/rpm/platform contents */
 
 #if HAVE_SYS_SYSTEMCFG_H
index f20be1a..cd73e9a 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <assert.h>
 #include <netinet/in.h>
+#include <netdb.h>
 
 #include <rpm/rpmmacro.h>
 #include <rpm/rpmlog.h>
index a5a2558..fd92b30 100644 (file)
--- a/system.h
+++ b/system.h
@@ -205,10 +205,6 @@ typedef void * cap_t;
 #endif
 extern const char *__progname;
 
-#if HAVE_NETDB_H
-#include <netdb.h>
-#endif
-
 /* Take care of NLS matters.  */
 
 #if HAVE_LOCALE_H
index 5a20901..43e962e 100644 (file)
@@ -65,6 +65,7 @@ marc@redhat.com and ewt@redhat.com.
 */
 
 #include <stdarg.h>
+#include <netdb.h>
 #include <rpm/rpmutil.h>
 #include "debug.h"