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

Vinoth vinoth at isoftel.com
Wed Feb 25 12:00:52 CET 2004


Hi Jochen

	Thanks for the patch, I am able to succesfully build agent++ library in
 SunOS 5.8
Generic_108528-07 sun4u sparc SUNW,UltraSPARC-IIi-Engin).

Thanks for the immediate response,

Vinoth


-----Original Message-----
From: Jochen Katz [mailto:katz at agentpp.com]
Sent: Wednesday, February 25, 2004 2:22 AM
To: vinoth at isoftel.com
Cc: agentpp at agentpp.org
Subject: Solaris gcc problems (Re: [AGENT++] Compilation Error)


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




More information about the AGENTPP mailing list