Compiling on OpenBSD

Sean.Lally at crownpeak.com Sean.Lally at crownpeak.com
Wed Aug 10 02:55:35 CEST 2005


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.  

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. 

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) == 0)
 #endif
+*/


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

 #include <stdio.h>
 #include <stdlib.h>

+/* 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 <sys/time.h>
+#include <time.h>
+#else
+#if HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+
 #undef HAVE_SYS_RESOURCE_H
 #ifdef HAVE_SYS_RESOURCE_H
 #include <sys/resource.h>
@@ -176,20 +191,6 @@
 #undef HAVE_ERRNO_H
 #ifdef HAVE_ERRNO_H
 #include <errno.h>
-#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 <sys/time.h>
-#include <time.h>
-#else
-#if HAVE_SYS_TIME_H
-#include <sys/time.h>
-#else
-#include <time.h>
-#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



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf




More information about the Developers mailing list