|
|
This works for me...
--- src/proto.c.orig 2006-02-27 13:23:23.000000000 +0100
+++ src/proto.c 2006-02-27 13:22:09.000000000 +0100
@@ -120,9 +121,9 @@
#else
- iaddr = &(myaddr.sin_addr);
+ iaddr = &(((struct sockaddr_in *)&myaddr)->sin_addr);
- hp = gethostbyaddr((void *)iaddr,sizeof(myaddr.sin_addr),family);
+ hp = gethostbyaddr((void *)iaddr,sizeof(((struct sockaddr_in *)
&myaddr)->sin_addr),family);
if ((hp == NULL) || (hp->h_name == NULL))
{
/H
On 1 mar 2006, at 13.59, Jamie McKnight wrote:
I want to start off by saying thanks to everyone who makes cfengine
possible (especially Mark B.).
When compiling cfengine 2.1.19 on Solaris 7, the following errors
occur
related to Solaris 7 not supporting ipv6 (truncated output, can
provide
more if needed):
"proto.c", line 123: left operand of "." must be struct/union object
"proto.c", line 123: unacceptable operand for unary &
"proto.c", line 125: left operand of "." must be struct/union object
Line 123 is:
iaddr = &(myaddr.sin_addr);
Line 125 is:
hp = gethostbyaddr((void *)iaddr,sizeof(myaddr.sin_addr),family);
So it would appear that Solaris 7 is still broken due to not
being ipv6
aware.
Under cfengine 2.1.18, we were able to work around this in our
Solaris 7
builds by putting an ifdef around line 66 of proto.c which was this:
struct sockaddr_in6 myaddr;
and make it look like this:
#ifdef SOL27
struct sockaddr_in myaddr;
#else
struct sockaddr_in6 myaddr;
#endif
Then we just needed to add the -DSOL27 to the compile flags.
While that work around did the trick for 2.1.18, I know a proper
fix will
need some more thought. Any suggestions on a fix for this?
Thanks in advance for any feedback. Please let me know if more
info is
needed.
Jamie
_______________________________________________
Bug-cfengine mailing list
Bug-cfengine@xxxxxxx
http://lists.gnu.org/mailman/listinfo/bug-cfengine
/Håkan
|
|