Xymon Mailing List Archive search

4.1.2p1 Client Compile Problems on HP-UX 11.0

list Adam Scheblein
Fri, 11 Nov 2005 11:28:17 -0600
Message-Id: <user-222598c94c03@xymon.invalid>

As a quick fix, (and a fix for an additional similar problem)  i changed the osdefs.h file to be the following (take note, i had to rename the snprintf and the socklen_t variables):

/*----------------------------------------------------------------------------*/
/* Hobbit monitor library.                                                    */
/* Compatibility definitions for various OS's                                 */
/*                                                                            */
/* Copyright (C) 2002-2005 Henrik Storner <user-e180c691dbbd@xymon.invalid>                 */
/*                                                                            */
/* This program is released under the GNU General Public License (GPL),       */
/* version 2. See the file "COPYING" for details.                             */
/*                                                                            */
/*----------------------------------------------------------------------------*/

#ifndef __LIBBBGEN_OSDEFS_H__
#define __LIBBBGEN_OSDEFS_H__

#include "config.h"

#include <sys/types.h>
#include <stdarg.h>

#ifndef HAVE_SOCKLEN_T
typedef int hobbit_socklen_t;
#endif

#ifndef HAVE_SNPRINTF
extern int hobbit_snprintf(char *str, size_t size, const char *format, ...);
#endif

#ifndef HAVE_VSNPRINTF
extern int vsnprintf(char *str, size_t size, const char *format, va_list ap);
#endif

#endif


Adam Scheblein wrote:
Greetings,

When compiling the newest snapshot on HP-UX 11.0 with gcc, i get the following error:

CC="/usr/local/bin/gcc" CFLAGS="-g -O -D_REENTRANT -DHPUX -I. -I`pwd`/include -DCLIENTONLY=1" OSDEF="-DHPUX" RPATHOPT="" PCREINCDIR="" SSLFLAGS="" SSLINCDIR="" SSLLIBS="" NETLIBS="-lnsl" BBTOPDIR="/home/hobbit" BBLOGDIR="" BBHOSTNAME="" BBHOSTIP="134.48.22.240" BBHOSTOS="" LOCALCLIENT="no" /usr/local/bin/gmake -C lib client
gmake[1]: Entering directory `/home/hobbit/uploaded/snapshot/lib'
/usr/local/bin/gcc -g -O -D_REENTRANT -DHPUX -I. -I/home/hobbit/uploaded/snapshot/include -DCLIENTONLY=1 -I. -I../include    -c -o osdefs.o osdefs.c
In file included from osdefs.c:16:
osdefs.h:25: error: conflicting types for `snprintf'
/usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.3.2/include/stdio.h:493: error: previous declaration of `snprintf'
gmake[1]: *** [osdefs.o] Error 1
gmake[1]: Leaving directory `/home/hobbit/uploaded/snapshot/lib'
gmake: *** [lib-client] Error 2


Any ideas?

thanks,
Adam