Xymon Mailing List Archive search

Compile on AIX VIO server 5.3

list Neil D. ManTech Ctr Camp
Fri, 11 Aug 2006 13:09:34 -0400
Message-Id: <user-bd78a5cf992b@xymon.invalid>

Change the file lib/osdefs.h to have the following (because my HP-UX
complained that socklen_t and snprintf were already defined):

typedef int hobbit_socklen_t;

extern int hobbit_snprintf(char *str, size_t size, const char *format,
...);

-----Original Message-----
From: Francesco Duranti [mailto:user-7104dcecbfef@xymon.invalid] 
Sent: Friday, August 11, 2006 12:41 PM
To: user-ae9b8668bcde@xymon.invalid
Subject: [hobbit] Compile on AIX VIO server 5.3

I cannot compile hobbit 4.2 on a AIX Virtual IO Server 1.3.0.0
(fixpack8) with gcc installed.


I get this error:
-bash-3.00$ gmake
CC="gcc" CFLAGS="-O -O3 -D_REENTRANT -DAIX -I. -I`pwd`/include
-DCLIENTONLY=1" LDFLAGS="" OSDEF="-DAIX" RPATHOPT="" PCREINCDIR=""
SSLFLAGS="" SSLINCDIR="" SSLLIBS="" NETLIBS="" BBTOPDIR="/home/bb"
BBLOGDIR="" BBHOSTNAME="" BBHOSTIP="10.90.2.10" BBHOSTOS=""
LOCALCLIENT="no" gmake -C lib client
gmake[1]: Entering directory `/home/bb/src/hobbit-4.2.0/lib'
gcc -O -O3 -D_REENTRANT -DAIX -I. -I/home/bb/src/hobbit-4.2.0/include
-DCLIENTONLY=1 -I. -I../include    -c -o cgiurls.o cgiurls.c
In file included from
/home/bb/src/hobbit-4.2.0/include/../lib/ipaccess.h:15,
                 from /home/bb/src/hobbit-4.2.0/include/libbbgen.h:58,
                 from cgiurls.c:24:
/usr/include/sys/socket.h:87: error: conflicting types for 'socklen_t'
/home/bb/src/hobbit-4.2.0/include/../lib/osdefs.h:21: error: previous
declaration of 'socklen_t' was here
gmake[1]: *** [cgiurls.o] Error 1
gmake[1]: Leaving directory `/home/bb/src/hobbit-4.2.0/lib'
gmake: *** [lib-client] Error 2

-bash-3.00$ uname -a
AIX itromvio01 3 5 


Removing the socklen_t from the osdefs.h let me compile and run the
client.