From 72cfaa5094eb795ab8aa50038cb04e9b4cbc4373 Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Thu, 12 Oct 2006 18:50:40 +0000 Subject: [PATCH] fix building under Solaris --- nagios/nagios.patch | 32 ++++++++++++++++++++++---------- nagios/nagios.spec | 2 +- 2 files changed, 23 insertions(+), 11 deletions(-) diff --git a/nagios/nagios.patch b/nagios/nagios.patch index 1432504e91..c0ae861f18 100644 --- a/nagios/nagios.patch +++ b/nagios/nagios.patch @@ -1,7 +1,7 @@ Index: base/checks.c ---- base/checks.c.orig 2006-02-16 05:47:55 +0100 -+++ base/checks.c 2006-06-01 10:34:34 +0200 -@@ -483,7 +483,8 @@ +--- base/checks.c.orig 2006-06-21 02:59:19.000000000 +0200 ++++ base/checks.c 2006-10-12 19:43:15.687168262 +0200 +@@ -486,7 +486,8 @@ _exit(STATE_UNKNOWN); /* default return string in case nothing was returned */ @@ -11,7 +11,7 @@ Index: base/checks.c /* grab the plugin output and clean it */ fgets(plugin_output,sizeof(plugin_output)-1,fp); -@@ -505,7 +506,7 @@ +@@ -508,7 +509,7 @@ /* record check result info */ strncpy(svc_msg.output,plugin_output,sizeof(svc_msg.output)-1); svc_msg.output[sizeof(svc_msg.output)-1]='\x0'; @@ -21,8 +21,8 @@ Index: base/checks.c svc_msg.check_type=SERVICE_CHECK_ACTIVE; svc_msg.finish_time=end_time; Index: base/logging.c ---- base/logging.c.orig 2005-12-13 01:42:45 +0100 -+++ base/logging.c 2006-06-01 10:34:34 +0200 +--- base/logging.c.orig 2005-12-13 01:42:45.000000000 +0100 ++++ base/logging.c 2006-10-12 19:43:15.687570530 +0200 @@ -208,6 +208,7 @@ /* write something to the syslog facility */ @@ -45,8 +45,8 @@ Index: base/logging.c syslog(LOG_USER|LOG_INFO,"%s",buffer); Index: base/utils.c ---- base/utils.c.orig 2006-05-20 20:37:29 +0200 -+++ base/utils.c 2006-06-01 10:34:34 +0200 +--- base/utils.c.orig 2006-07-13 23:55:10.000000000 +0200 ++++ base/utils.c 2006-10-12 19:43:15.689542314 +0200 @@ -2806,7 +2806,7 @@ /* report an error if we couldn't run the command */ if(fp==NULL){ @@ -90,8 +90,8 @@ Index: base/utils.c write_to_logs_and_console(buffer,NSLOG_RUNTIME_WARNING,TRUE); } Index: nagios-plugins-1.4.3/configure ---- nagios-plugins-1.4.3/configure.orig 2006-04-19 05:52:19 +0200 -+++ nagios-plugins-1.4.3/configure 2006-06-01 10:34:34 +0200 +--- nagios-plugins-1.4.3/configure.orig 2006-04-19 05:52:19.000000000 +0200 ++++ nagios-plugins-1.4.3/configure 2006-10-12 19:43:15.705072958 +0200 @@ -25122,8 +25122,8 @@ fi @@ -121,3 +121,15 @@ Index: nagios-plugins-1.4.3/configure elif [ "z$ac_cv_uname_s" = "zUnixWare" ] && \ $PATH_TO_PING -n -s 127.0.0.1 56 1 2>/dev/null | \ +Index: nagios-plugins-1.4.3/plugins/common.h +--- nagios-plugins-1.4.3/plugins/common.h.orig 2005-12-07 16:10:27.000000000 +0100 ++++ nagios-plugins-1.4.3/plugins/common.h 2006-10-12 20:16:46.061238204 +0200 +@@ -193,7 +193,7 @@ + + /* Solaris does not have floorf, but floor works. Should probably be in configure */ + #if defined(__sun) || defined(__sun__) +-static inline float floorf (float x) { return floor(x); } ++#define floorf(x) (float)floor((double)(x)) + #endif + + enum { diff --git a/nagios/nagios.spec b/nagios/nagios.spec index dda3f648d8..cee07c7d50 100644 --- a/nagios/nagios.spec +++ b/nagios/nagios.spec @@ -37,7 +37,7 @@ Class: EVAL Group: Monitoring License: GPL Version: %{V_nagios} -Release: 20060923 +Release: 20061012 # package options %option with_perl yes