[ntp:bugs] [Bug 721] ntp_request.c: struct sockaddr_storage has no member named ss_len

bugzilla at ntp.isc.org bugzilla at ntp.isc.org
Fri Oct 13 01:09:04 UTC 2006


http://bugs.ntp.isc.org/721



----------------------------------------------------------------------------
Additional Comments From dclark at pobox.com (Daniel Clark)
Submitted on 2006-10-13 01:09

Created an attachment (id=301)
 --> (http://bugs.ntp.isc.org/attachment.cgi?id=301&action=view)
/usr/include/sys/socket.h from my AIX 5.3 ML5 system

This is the /usr/include/sys/socket.h from my AIX 5.3 ML5 system. It would be
interesting to compare this to the socket.h on the system(s) that are working. 

In my copy of this file the namings seem to be a special case not covered by
configure.ac - namely that in "struct sockaddr_storage", The variables are
"ss_family" and "__ss_len" (The configure.ac file as I read it seems to say
that if  ss_family exists then ss_len exists, and if __ss_family exists than
__ss_len exists, which doesn't seem to be the case in the socket.h I somehow
wound up with.)

struct sockaddr_storage {
	uchar_t 	__ss_len;	/* address length */
	sa_family_t	ss_family;    /* address family */


After adding -DCOMPAT_43 to CPPFLAGS (I also threw in -D_LINUX_SOURCE_COMPAT
-DBROKEN_GETADDRINFO which I use when compiling OpenSSH for good measure) a
different definition of "struct sockaddr_storage" was used, and this seems to
have caused configure to do the right thing:

Before compiling with -COMPAT_43, configure gave:

checking for ss_family field in struct sockaddr_storage... yes
checking for __ss_family field in struct sockaddr_storage... no

and after:

checking for ss_family field in struct sockaddr_storage... no
checking for __ss_family field in struct sockaddr_storage... yes

And the compile completes without error, and the binaries run, although I
haven't tested them yet, and I don't know of -DCOMPAT_43 will have any negative
side effects.

-- 
Daniel Clark <dclark at pobox.com>



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


More information about the bugs mailing list