aboutsummaryrefslogtreecommitdiff
path: root/plugins/common.h
diff options
context:
space:
mode:
authorGravatar Ton Voon <tonvoon@users.sourceforge.net> 2006-12-07 16:07:42 +0000
committerGravatar Ton Voon <tonvoon@users.sourceforge.net> 2006-12-07 16:07:42 +0000
commitdf3662bf3ac0d071b6f0b2d4e5bd45942667e75e (patch)
treef168820b481cad2b9a37325efb7382f26b9e85a7 /plugins/common.h
parent26725ccd159105e38e5ab4ddc9ef848a5253e6d2 (diff)
downloadmonitoring-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.h27
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 @@
#define _COMMON_H_
#include "config.h"
+/* This needs to be removed for Solaris servers, where 64 bit files, but 32 bit architecture
+ This needs to be done early on because subsequent system includes use _FILE_OFFSET_BITS
+ Cannot remove from config.h because is included by regex.c from lib/ */
+#if __sun__ && !defined(_LP64) && _FILE_OFFSET_BITS == 64
+#undef _FILE_OFFSET_BITS
+#endif
#ifdef HAVE_FEATURES_H
#include <features.h>
@@ -114,27 +120,6 @@
#include <locale.h>
#endif
-/* Fixes "Cannot use swapctl in the large files compilation environment" error on Solaris */
-#ifdef _FILE_OFFSET_BITS
-#undef _FILE_OFFSET_BITS
-#endif
-
-#ifdef HAVE_DECL_SWAPCTL
-# ifdef HAVE_SYS_SWAP_H
-# include <sys/swap.h>
-# endif
-# ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-# endif
-# ifdef HAVE_SYS_PARAM_H
-# include <sys/param.h>
-# endif
-#endif
-
-#ifndef SWAP_CONVERSION
-# define SWAP_CONVERSION 1
-#endif
-
#ifdef HAVE_SYS_POLL_H
# include "sys/poll.h"
#endif