Re: [boost] [asio].[hp-ux].[1_33_1] Build related issue

Hi Chris, Christopher Kohlhoff <chris <at> kohlhoff.com> writes:
Hi Gaurav, Is this using 0.3.7? The line number corresponds to a comment in the latest version of the code.
Version of daytime_client.cpp is indeed 0.3.8.
"/1_33_1/include/boost/asio/ip/basic_endpoint.hpp", line 173.14: 1540-0217 (S) "ss_family" is not a member of "struct sockaddr_storage".
Have a look in the system header file sys/socket.h (which is where sockaddr_storage should be defined) and see if there is a #define that
determines what members sockaddr_storage contains.
Cheers, Chris
Quite strange that struct sockaddr_storage doesn't have any member "ss_family", instead address family is represented by "__ss_family". ------------------------------------------------------------------------ - #if defined(COMPAT_43) && !defined(_KERNEL) #define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof(ushort_t)) #define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof(ushort_t) + \ _SS_PAD1SIZE + _SS_ALIGNSIZE)) struct sockaddr_storage { ushort_t __ss_family; /* address family */ char __ss_pad1[_SS_PAD1SIZE]; /* pad up to alignment field */ #if defined(__64BIT__) || (defined(_ALL_SOURCE) && defined(_LONG_LONG)) int64_t __ss_align; /* field to force desired structure */ /* storage alignment */ #else int __ss_align[2]; #endif char __ss_pad2[_SS_PAD2SIZE]; /* pad to achieve desired size */ }; #else #define _SS_PAD1SIZE (_SS_ALIGNSIZE - (sizeof(uchar_t) + sizeof(sa_family_t))) #define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof(sa_family_t) + \ _SS_PAD1SIZE + _SS_ALIGNSIZE)) struct sockaddr_storage { uchar_t __ss_len; /* address length */ sa_family_t __ss_family; /* address family */ char __ss_pad1[_SS_PAD1SIZE]; /* pad up to alignment field */ #if defined(__64BIT__) || (defined(_ALL_SOURCE) && defined(_LONG_LONG)) int64_t __ss_align; /* field to force desired structure */ /* storage alignment */ #else int __ss_align[2]; #endif char __ss_pad2[_SS_PAD2SIZE]; /* pad to achieve desired size */ }; #endif /* COMPAT_43 */ ------------------------------------------------------------------------ ----- socket applications can be compiled with COMPAT_43 defined. This will make the sockaddr structure BSD 4.3 compatible. Regards, Gaurav

Hi Gaurav, On Tue, 13 Feb 2007 12:28:32 +0530, Gaurav.Jain@iflexsolutions.com said:
Quite strange that struct sockaddr_storage doesn't have any member "ss_family", instead address family is represented by "__ss_family".
Indeed. There's no "#define ss_family __ss_family" anywhere? I think AIX support will have to wait until after I release 0.3.8, as it looks like some non-trivial changes may be required. Cheers, Chris
participants (2)
-
Christopher Kohlhoff
-
Gaurav.Jain@iflexsolutions.com