nrpe on IRIX
Dan Rich
drich at employees.org
Fri May 9 19:27:40 CEST 2003
Dan Rich said:
> Has anyone successfully built and installed nrpe on IRIX? I have it compiling
> fine, but something odd is going on in the socket code. The connection never
> succeeds and I find the following in my syslog:
Ok, if anyone else ever tries this, the problem is that inet_ntoa() is broken
on IRIX with gcc. The solution is the patch below. You should also remove
the -lnsl -lsocket from src/Makefile, I didn't have time to figure out how to
get configure to do this.
--- nrpe.c.orig Fri May 9 10:24:29 2003
+++ nrpe.c Fri May 9 10:20:01 2003
@@ -23,6 +23,18 @@
#include "nrpe.h"
#include "utils.h"
+#ifdef sgi
+ char *
+ _gcc_workaround_inet_ntoa( struct in_addr a ) {
+ static char buf[64];
+ unsigned char *pc = (unsigned char *)&a;
+ snprintf(buf, 64, "%d.%d.%d.%d", pc[0], pc[1], pc[2], pc[3]);
+ return buf;
+ }
+
+ #define inet_ntoa _gcc_workaround_inet_ntoa
+#endif
+
#define DEFAULT_COMMAND_TIMEOUT 60 /* default
timeout for execution of plugins */
#define MAXFD 64
--
Dan Rich <drich at employees.org> | http://www.employees.org/~drich/
| "Step up to red alert!" "Are you sure, sir?
| It means changing the bulb in the sign..."
| - Red Dwarf (BBC)
-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
_______________________________________________
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