summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorJeremy T. Bouse <undrgrid@users.sourceforge.net>2003-03-07 22:11:25 (GMT)
committerJeremy T. Bouse <undrgrid@users.sourceforge.net>2003-03-07 22:11:25 (GMT)
commit7ceff0d5a95f5c5f34235ef6682595f169864d2f (patch)
treee153a07b7ba9416c1b7262ce00542e55cab9cb93 /plugins
parent1f7520fae4a776e0af2c5221071f1ff300de8727 (diff)
downloadmonitoring-plugins-7ceff0d5a95f5c5f34235ef6682595f169864d2f.tar.gz
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
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_pgsql.c1
-rw-r--r--plugins/common.h.in7
-rw-r--r--plugins/netutils.c2
-rw-r--r--plugins/netutils.h.in3
4 files changed, 8 insertions, 5 deletions
diff --git a/plugins/check_pgsql.c b/plugins/check_pgsql.c
index f8419dc..2033b8c 100644
--- a/plugins/check_pgsql.c
+++ b/plugins/check_pgsql.c
@@ -79,7 +79,6 @@ enum {
79#include "config.h" 79#include "config.h"
80#include "common.h" 80#include "common.h"
81#include "utils.h" 81#include "utils.h"
82#include <netdb.h>
83#include <libpq-fe.h> 82#include <libpq-fe.h>
84 83
85int process_arguments (int, char **); 84int process_arguments (int, char **);
diff --git a/plugins/common.h.in b/plugins/common.h.in
index 48e7f6f..09df00d 100644
--- a/plugins/common.h.in
+++ b/plugins/common.h.in
@@ -72,6 +72,13 @@
72 72
73#include <ctype.h> 73#include <ctype.h>
74 74
75#if HAVE_LWRES_NETDB_H
76#include <lwres/netdb.h>
77#elif !HAVE_GETADDRINFO
78#include "getaddrinfo.h"
79#else
80#include <netdb.h>
81#endif
75 82
76/* 83/*
77 * 84 *
diff --git a/plugins/netutils.c b/plugins/netutils.c
index e5d3528..fc85a24 100644
--- a/plugins/netutils.c
+++ b/plugins/netutils.c
@@ -31,10 +31,8 @@
31 31
32#include "config.h" 32#include "config.h"
33#include "common.h" 33#include "common.h"
34#include <sys/socket.h>
35#include <netinet/in.h> 34#include <netinet/in.h>
36#include <arpa/inet.h> 35#include <arpa/inet.h>
37#include <netdb.h>
38 36
39extern int socket_timeout; 37extern int socket_timeout;
40RETSIGTYPE socket_timeout_alarm_handler (int); 38RETSIGTYPE socket_timeout_alarm_handler (int);
diff --git a/plugins/netutils.h.in b/plugins/netutils.h.in
index be4ae24..1907ab7 100644
--- a/plugins/netutils.h.in
+++ b/plugins/netutils.h.in
@@ -34,10 +34,9 @@
34#undef HAVE_STRINGS_H 34#undef HAVE_STRINGS_H
35#undef HAVE_STRING_H 35#undef HAVE_STRING_H
36 36
37#include <sys/socket.h> 37#include "common.h"
38#include <netinet/in.h> 38#include <netinet/in.h>
39#include <arpa/inet.h> 39#include <arpa/inet.h>
40#include <netdb.h>
41 40
42void socket_timeout_alarm_handler (int); 41void socket_timeout_alarm_handler (int);
43 42