[Nagios-devel] Compiling on OpenBSD

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] Compiling on OpenBSD

Post by Guest »

I was having trouble compiling on OpenBSD 3.6 and looking at the
nagios-users list looks like someone else was having the same trouble
with 3.7. I moved the time.h headers so they come before
sys/resource.h. Hopefully that works for everone else as it does away
with the errors I was getting compiling. =20

I commented out the WEXITSTATUS and WIFEXITED as it was generating many
warnings that it had already been defined. Take that suggestion with a
grain of salt. Thanks.=20

Sean

diff -U 3 /nagios-cvs/nagios/include/config.h.in
/nagios-cvs-patched/nagios/include/config.h.in
--- /nagios-cvs/nagios/include/config.h.in Mon Aug 8 17:01:20 2005
+++ /nagios-cvs-patched/nagios/include/config.h.in Mon Aug 8 16:53:49
2005
@@ -94,20 +94,35 @@
#define RTLD_NOW 0
#endif

+/*
#ifndef WEXITSTATUS
# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
#endif
#ifndef WIFEXITED
# define WIFEXITED(stat_val) (((stat_val) & 255) =3D=3D 0)
#endif
+*/


-
/***** HEADER FILES *****/

#include
#include

+/* needed for the time_t structures we use later... */
+#undef TIME_WITH_SYS_TIME
+#undef HAVE_SYS_TIME_H
+#if TIME_WITH_SYS_TIME
+#include
+#include
+#else
+#if HAVE_SYS_TIME_H
+#include
+#else
+#include
+#endif
+#endif
+
#undef HAVE_SYS_RESOURCE_H
#ifdef HAVE_SYS_RESOURCE_H
#include
@@ -176,20 +191,6 @@
#undef HAVE_ERRNO_H
#ifdef HAVE_ERRNO_H
#include
-#endif
-
-/* needed for the time_t structures we use later... */
-#undef TIME_WITH_SYS_TIME
-#undef HAVE_SYS_TIME_H
-#if TIME_WITH_SYS_TIME
-#include
-#include
-#else
-#if HAVE_SYS_TIME_H
-#include
-#else
-#include
-#endif
#endif

#undef HAVE_SYS_TIMEB_H

SEAN LALLY
CrownPeak Technology
________________________________
13323 Washington Blvd, Suite 206
Los Angeles, CA 90066

(310) 577 5850 x 233






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked