Compile error with latest snapshot

Henrik Stoerner henrik at hswn.dk
Tue Aug 15 18:46:59 CEST 2006


Michael writes:

>  I am attempting to move our production Hobbit server to the latest
> snapshot. The latest snapshot fails to compile. The error that it gives is:
> 
> gmake[1]: Entering directory `/Users/hobbit/Desktop/snapshot/bbdisplay'
> gcc -g -O -Wall -Wno-unused -D_REENTRANT -DBIND_8_COMPAT=1
> -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DDarwin -I.
> -I/Users/hobbit/Desktop/snapshot/include -I/usr/local/include -c -o bbgen.o
> bbgen.c
> In file included from bbgen.c:26:
> bbgen.h:173: error: conflicting types for `host_t'
> /usr/include/mach/mach_types.h:103: error: previous declaration of `host_t'
> gmake[1]: *** [bbgen.o] Error 1

OK, so OSX decided to make "host_t" a standard system-defined type.

I've attached a really quick (read: ugly) fix, which sidesteps it by
using the C "define" feature to rename the Hobbit host_t type to
something else. I think that should make the compile work.


Regards,
Henrik

-------------- next part --------------
--- bbdisplay/bbgen.h	2006/05/03 21:12:33	1.127
+++ bbdisplay/bbgen.h	2006/08/15 16:41:13
@@ -140,6 +140,9 @@
 	struct state_t	*next;
 } state_t;
 
+/* OSX has a built-in "host_t" type. */
+#define host_t bbgen_host_t
+
 typedef struct host_t {
 	char	*hostname;
 	char	*displayname;


More information about the Xymon mailing list