[PATCH] NRPE Compile FIX
Thomas Glanzmann
thomas at glanzmann.de
Fri Feb 22 07:42:23 CET 2008
Hello,
the version 2.11 of nrpe does not build under Solaris because it depends
on two defines that are not existant and uses the gnu version of the
asprintf.
Thomas
--- src/nrpe.c.tg 2008-02-22 07:28:15.880067000 +0100
+++ src/nrpe.c 2008-02-22 07:32:08.870003000 +0100
@@ -80,13 +80,13 @@
int debug=FALSE;
+static char env_string[128];
int main(int argc, char **argv){
int result=OK;
int x;
char buffer[MAX_INPUT_BUFFER];
- char *env_string=NULL;
#ifdef HAVE_SSL
DH *dh;
char seedfile[FILENAME_MAX];
@@ -94,9 +94,8 @@
#endif
/* set some environment variables */
- asprintf(&env_string,"NRPE_MULTILINESUPPORT=1");
- putenv(env_string);
- asprintf(&env_string,"NRPE_PROGRAMVERSION=%s",PROGRAM_VERSION);
+ putenv("NRPE_MULTILINESUPPORT=1");
+ snprintf(128, env_string,"NRPE_PROGRAMVERSION=%s",PROGRAM_VERSION);
putenv(env_string);
/* process command-line args */
@@ -613,10 +612,12 @@
log_facility=LOG_UUCP;
else if(!strcmp(varvalue,"cron"))
log_facility=LOG_CRON;
+#if 0
else if(!strcmp(varvalue,"authpriv"))
log_facility=LOG_AUTHPRIV;
else if(!strcmp(varvalue,"ftp"))
log_facility=LOG_FTP;
+#endif
else if(!strcmp(varvalue,"local0"))
log_facility=LOG_LOCAL0;
else if(!strcmp(varvalue,"local1"))
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list