From 7ceff0d5a95f5c5f34235ef6682595f169864d2f Mon Sep 17 00:00:00 2001 From: "Jeremy T. Bouse" Date: Fri, 7 Mar 2003 22:11:25 +0000 Subject: Added getaddrinfo.[ch] & gethostbyname.[ch] to provide RFC2553 functions if missing in system libs and lwres not present Moved all references to netdb.h and sys/socket.h into common.h.in Modified automake call in tools/setup to include adding missing files so config.sub and config.guess will be available git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@376 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/check_pgsql.c | 1 - plugins/common.h.in | 7 +++++++ plugins/netutils.c | 2 -- plugins/netutils.h.in | 3 +-- 4 files changed, 8 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c index f8419dca..2033b8c1 100644 --- a/plugins/check_pgsql.c +++ b/plugins/check_pgsql.c @@ -79,7 +79,6 @@ enum { #include "config.h" #include "common.h" #include "utils.h" -#include #include int process_arguments (int, char **); diff --git a/plugins/common.h.in b/plugins/common.h.in index 48e7f6f4..09df00dd 100644 --- a/plugins/common.h.in +++ b/plugins/common.h.in @@ -72,6 +72,13 @@ #include +#if HAVE_LWRES_NETDB_H +#include +#elif !HAVE_GETADDRINFO +#include "getaddrinfo.h" +#else +#include +#endif /* * diff --git a/plugins/netutils.c b/plugins/netutils.c index e5d35281..fc85a246 100644 --- a/plugins/netutils.c +++ b/plugins/netutils.c @@ -31,10 +31,8 @@ #include "config.h" #include "common.h" -#include #include #include -#include extern int socket_timeout; RETSIGTYPE socket_timeout_alarm_handler (int); diff --git a/plugins/netutils.h.in b/plugins/netutils.h.in index be4ae241..1907ab7e 100644 --- a/plugins/netutils.h.in +++ b/plugins/netutils.h.in @@ -34,10 +34,9 @@ #undef HAVE_STRINGS_H #undef HAVE_STRING_H -#include +#include "common.h" #include #include -#include void socket_timeout_alarm_handler (int); -- cgit v1.2.3-74-g34f1