Problem Compiling N.R.P.E. on AIX Unix 4.3

giabbo gianluca.boccia at bitmedia.it
Mon Jun 9 14:46:31 CEST 2003


I have a problem when compiling all version of nrpe tools on unix aix.
I try to compile the nrpe, for example version 1.8, with standard options, and gcc compiler; 
when the GCC compiles, it finds an error in nrpe.c and utils.c in the some use of variable declared in system.h library. This is the output:

>gcc -g -O2 -DHAVE_CONFIG_H  -lnsl nrpe.c utils.c -o nrpe
>In file included from ../common/config.h:110,
                 from nrpe.c:22:
>/usr/lynx/cross_43/lib/gcc-lib/powerpc-cetia-lynxos/2.8. 1/natif/usr/include/sys/time.h:21: >warning: #warning Using <time.h> instead of <sys/time.h>
>nrpe.c: In function `wait_for_connections':
>nrpe.c:352: `AF_INET' undeclared (first use in this function)
>nrpe.c:352: (Each undeclared identifier is reported only once
>nrpe.c:352: for each function it appears in.)
>nrpe.c:352: `SOCK_STREAM' undeclared (first use in this >function)
>nrpe.c:362: `SOL_SOCKET' undeclared (first use in this >function)
>nrpe.c:362: `SO_REUSEADDR' undeclared (first use in this >function)
>In file included from ../common/config.h:110,
                 from utils.h:32,
                 from utils.c:33:
>/usr/lynx/cross_43/lib/gcc-lib/powerpc-cetia-lynxos/2.8. 1/natif/usr/include/sys/time.h:21: >warning: #warning Using <time.h> instead of <sys/time.h>
>utils.c: In function `my_connect':
>utils.c:54: `AF_INET' undeclared (first use in this function)
>utils.c:54: (Each undeclared identifier is reported only once
>utils.c:54: for each function it appears in.)
>utils.c:61: warning: passing arg 1 of `gethostbyname' discards >`const' from pointer target type
>utils.c:77: `PF_INET' undeclared (first use in this function)
>utils.c:77: `SOCK_DGRAM' undeclared (first use in this >function)
>utils.c:77: `SOCK_STREAM' undeclared (first use in this >function)
>make[1]: *** [nrpe] Error 1

Someone have idea to resolve this problem ???

Thanks for all

Gianluca


-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list