diff options
author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-12-07 16:07:42 +0000 |
---|---|---|
committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-12-07 16:07:42 +0000 |
commit | df3662bf3ac0d071b6f0b2d4e5bd45942667e75e (patch) | |
tree | f168820b481cad2b9a37325efb7382f26b9e85a7 /plugins/common.h | |
parent | 26725ccd159105e38e5ab4ddc9ef848a5253e6d2 (diff) | |
download | monitoring-plugins-df3662bf3ac0d071b6f0b2d4e5bd45942667e75e.tar.gz |
Fix coredump on 64bit Solaris. Also adds more error conditions and moves
swap specific includes out of common.h (Duncan Ferguson - 1588031)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1546 f882894a-f735-0410-b71e-b25c423dba1c
Diffstat (limited to 'plugins/common.h')
-rw-r--r-- | plugins/common.h | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/plugins/common.h b/plugins/common.h index ac3b8339..b3357431 100644 --- a/plugins/common.h +++ b/plugins/common.h | |||
@@ -36,6 +36,12 @@ | |||
36 | #define _COMMON_H_ | 36 | #define _COMMON_H_ |
37 | 37 | ||
38 | #include "config.h" | 38 | #include "config.h" |
39 | /* This needs to be removed for Solaris servers, where 64 bit files, but 32 bit architecture | ||
40 | This needs to be done early on because subsequent system includes use _FILE_OFFSET_BITS | ||
41 | Cannot remove from config.h because is included by regex.c from lib/ */ | ||
42 | #if __sun__ && !defined(_LP64) && _FILE_OFFSET_BITS == 64 | ||
43 | #undef _FILE_OFFSET_BITS | ||
44 | #endif | ||
39 | 45 | ||
40 | #ifdef HAVE_FEATURES_H | 46 | #ifdef HAVE_FEATURES_H |
41 | #include <features.h> | 47 | #include <features.h> |
@@ -114,27 +120,6 @@ | |||
114 | #include <locale.h> | 120 | #include <locale.h> |
115 | #endif | 121 | #endif |
116 | 122 | ||
117 | /* Fixes "Cannot use swapctl in the large files compilation environment" error on Solaris */ | ||
118 | #ifdef _FILE_OFFSET_BITS | ||
119 | #undef _FILE_OFFSET_BITS | ||
120 | #endif | ||
121 | |||
122 | #ifdef HAVE_DECL_SWAPCTL | ||
123 | # ifdef HAVE_SYS_SWAP_H | ||
124 | # include <sys/swap.h> | ||
125 | # endif | ||
126 | # ifdef HAVE_SYS_STAT_H | ||
127 | # include <sys/stat.h> | ||
128 | # endif | ||
129 | # ifdef HAVE_SYS_PARAM_H | ||
130 | # include <sys/param.h> | ||
131 | # endif | ||
132 | #endif | ||
133 | |||
134 | #ifndef SWAP_CONVERSION | ||
135 | # define SWAP_CONVERSION 1 | ||
136 | #endif | ||
137 | |||
138 | #ifdef HAVE_SYS_POLL_H | 123 | #ifdef HAVE_SYS_POLL_H |
139 | # include "sys/poll.h" | 124 | # include "sys/poll.h" |
140 | #endif | 125 | #endif |