Solaris gcc problems (Re: [AGENT++] Compilation Error)

Jochen Katz katz at agentpp.com
Tue Feb 24 21:51:52 CET 2004


Hi all,

>     I tried compiling Agent++ library in solaris (SunOS 5.8 
> Generic_108528-07 sun4u sparc SUNW,UltraSPARC-IIi-Engine) .

> address.cpp:725: cannot convert `hostent**' to `int*' for argument `5' to `
>    hostent* gethostbyname_r(const char*, hostent*, char*, int, int*)'
> address.cpp:838: cannot convert `hostent**' to `int*' for argument `7' to `
>    hostent* gethostbyaddr_r(const char*, int, int, hostent*, char*, int, 
> int*)'

I've attached a patch for address.cpp to use the gethostbyname_r and 
gethostbyaddr_r functions as defined in 
http://docs.sun.com/db/doc/816-0214/6m6nf1omt?a=view
To use this code you have to define SUN_GCC.

As I would like to define SUN_GCC (or some better name) automatically: 
Does anyone have a Solaris system with gcc where SUN_GCC must not be 
defined?

 > address.cpp:730: `gethostbyname2_r' undeclared (first use this function)

If you don't want to use IPv6 you can undefine SNMP_PP_IPv6 in 
config_snmp_pp.h.

Does anyone have gethostbyname2_r on a Sun Solaris system? If not I will 
have to change address.cpp.

Regards,
   Jochen
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sun_gcc.txt
Url: http://lists.agentpp.org/pipermail/agentpp/attachments/20040224/7643f29f/attachment.txt 


More information about the AGENTPP mailing list