diff options
author | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | 2003-06-30 18:52:38 +0000 |
---|---|---|
committer | Jeremy T. Bouse <undrgrid@users.sourceforge.net> | 2003-06-30 18:52:38 +0000 |
commit | 97634d8fc6bba849f771eda24106d88104e703b9 (patch) | |
tree | 88bc233fc2e2361c46c3b68a57a4f4fa44456e6c | |
parent | 2527943a443e2551e722ed6b8f1bc86f76dc823a (diff) | |
download | monitoring-plugins-97634d8fc6bba849f771eda24106d88104e703b9.tar.gz |
Corrections to get code to compile on systems without IPv6 support
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@574 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r-- | plugins/check_ping.c | 4 | ||||
-rw-r--r-- | plugins/check_ssh.c | 4 | ||||
-rw-r--r-- | plugins/check_tcp.c | 4 | ||||
-rw-r--r-- | plugins/netutils.c | 4 |
4 files changed, 16 insertions, 0 deletions
diff --git a/plugins/check_ping.c b/plugins/check_ping.c index 0b2afce5..06bf8e76 100644 --- a/plugins/check_ping.c +++ b/plugins/check_ping.c @@ -227,7 +227,11 @@ process_arguments (int argc, char **argv) address_family = AF_INET; break; case '6': /* IPv6 only */ +#ifdef USE_IPV6 address_family = AF_INET6; +#else + usage ("IPv6 support not available\n"); +#endif break; case 'H': /* hostname */ ptr=optarg; diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index 421fc01c..fba3a862 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c @@ -110,7 +110,11 @@ process_arguments (int argc, char **argv) address_family = AF_INET; break; case '6': +#ifdef USE_IPV6 address_family = AF_INET6; +#else + usage ("IPv6 support not available\n"); +#endif break; case 'H': /* host */ if (is_host (optarg) == FALSE) diff --git a/plugins/check_tcp.c b/plugins/check_tcp.c index b8af1a1d..ce4fd31f 100644 --- a/plugins/check_tcp.c +++ b/plugins/check_tcp.c @@ -449,7 +449,11 @@ process_arguments (int argc, char **argv) address_family = AF_INET; break; case '6': +#ifdef USE_IPV6 address_family = AF_INET6; +#else + usage ("IPv6 support not available\n"); +#endif break; case 'H': /* hostname */ if (is_host (optarg) == FALSE) diff --git a/plugins/netutils.c b/plugins/netutils.c index 60410c64..ea004bb4 100644 --- a/plugins/netutils.c +++ b/plugins/netutils.c @@ -326,7 +326,11 @@ is_host (char *address) int is_addr (char *address) { +#ifdef USE_IPV6 if (is_inet_addr (address) && address_family != AF_INET6) +#else + if (is_inet_addr (address)) +#endif return (TRUE); #ifdef USE_IPV6 |