Xymon Mailing List Archive search

Compile error with latest snapshot

2 messages in this thread

list Henrik Størner · Tue, 15 Aug 2006 18:46:59 +0200 ·
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;
list Michael Dunne · Tue, 15 Aug 2006 14:20:08 -0400 ·
That worked, thanks for the quick patch, and thanks again for Hobbit!

Mike
quoted from Henrik Størner


On 8/15/06 12:46 PM, "Henrik Stoerner" <user-ce4a2c883f75@xymon.invalid> wrote:
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