Jim (moving this conversation to the openslp-devel list), I have an AIX box to play with, but it doesn't currently have subversion client installed, so I can't check out a work area there, so I'm going to take a stab at fixing it without building.
I took at look at /usr/include/netinet/in.h. This is typical of IBM - they could make it easy and do things the way everyone else does, but they have to be different everywhere the standard allows them to be different, which is usually just enough to mess everyone up. The structures are actually functionally identical, and even have the same size - with the singular exception that the union field order is reversed between AIX and everyone else, which causes the initializers to have to be declared differently. All IPv6 addresses are 16 bytes long - at least in the address portion of the sockaddr structure. Generally, everyone defines these structures such that the 16 uint8's are first in the union, which means the initializers would be declared as an array of 16 8-bit quantities. On AIX, the 4 uint32's are first, which means that the initializers have to be declared with 4 32-bit fields. This actually causes IBM problems because they wanted to be able to add an additional field containing 2 uint64 fields, but they couldn't put that first because that would mess up their own initializers for loopback, broadcast, and addr_any, so their own fields can't be declared in ascending or descending order because of the choice they made to reverse the fields from everyone else's definition! Please replace the constant initializers in slp_net.c with this code: #ifdef _AIX # define IN6ADDR_SRVLOC_NODE_INIT {{{0x1ff,0,0,0x16010000}}} # define IN6ADDR_SRVLOC_LINK_INIT {{{0x2ff,0,0,0x16010000}}} # define IN6ADDR_SRVLOC_SITE_INIT {{{0x5ff,0,0,0x16010000}}} # define IN6ADDR_SRVLDA_NODE_INIT {{{0x1ff,0,0,0x23010000}}} # define IN6ADDR_SRVLDA_LINK_INIT {{{0x2ff,0,0,0x23010000}}} # define IN6ADDR_SRVLDA_SITE_INIT {{{0x5ff,0,0,0x23010000}}} # define IN6ADDR_SVCNOD_MASK_INIT {{{0x1ff,0,0,0x00100100}}} # define IN6ADDR_SVCLNK_MASK_INIT {{{0x2ff,0,0,0x00100100}}} # define IN6ADDR_SVCSIT_MASK_INIT {{{0x5ff,0,0,0x00100100}}} #else # define IN6ADDR_SRVLOC_NODE_INIT {{{0xff,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0x16}}} # define IN6ADDR_SRVLOC_LINK_INIT {{{0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,1,0x16}}} # define IN6ADDR_SRVLOC_SITE_INIT {{{0xff,5,0,0,0,0,0,0,0,0,0,0,0,0,1,0x16}}} # define IN6ADDR_SRVLDA_NODE_INIT {{{0xff,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0x23}}} # define IN6ADDR_SRVLDA_LINK_INIT {{{0xff,2,0,0,0,0,0,0,0,0,0,0,0,0,1,0x23}}} # define IN6ADDR_SRVLDA_SITE_INIT {{{0xff,5,0,0,0,0,0,0,0,0,0,0,0,0,1,0x23}}} # define IN6ADDR_SVCNOD_MASK_INIT {{{0xff,1,0,0,0,0,0,0,0,0,0,0,0,1,0x10,0}}} # define IN6ADDR_SVCLNK_MASK_INIT {{{0xff,2,0,0,0,0,0,0,0,0,0,0,0,1,0x10,0}}} # define IN6ADDR_SVCSIT_MASK_INIT {{{0xff,5,0,0,0,0,0,0,0,0,0,0,0,1,0x10,0}}} #endif /** IPv6 SLP address constants */ const struct in6_addr in6addr_srvloc_node = IN6ADDR_SRVLOC_NODE_INIT; const struct in6_addr in6addr_srvloc_link = IN6ADDR_SRVLOC_LINK_INIT; const struct in6_addr in6addr_srvloc_site = IN6ADDR_SRVLOC_SITE_INIT; const struct in6_addr in6addr_srvlocda_node = IN6ADDR_SRVLDA_NODE_INIT; const struct in6_addr in6addr_srvlocda_link = IN6ADDR_SRVLDA_LINK_INIT; const struct in6_addr in6addr_srvlocda_site = IN6ADDR_SRVLDA_SITE_INIT; const struct in6_addr in6addr_service_node_mask = IN6ADDR_SVCNOD_MASK_INIT; const struct in6_addr in6addr_service_link_mask = IN6ADDR_SVCLNK_MASK_INIT; const struct in6_addr in6addr_service_site_mask = IN6ADDR_SVCSIT_MASK_INIT; const struct in6_addr slp_in6addr_any = SLP_IN6ADDR_ANY_INIT; const struct in6_addr slp_in6addr_loopback = SLP_IN6ADDR_LOOPBACK_INIT; and then replace the following constant definitions in slp_net.h: /** IN6 "Any" and "Loopback" address initializer macros */ #ifdef _AIX # define SLP_IN6ADDR_ANY_INIT {{{0,0,0,0}}} # define SLP_IN6ADDR_LOOPBACK_INIT {{{0,0,0,1}}} #else # define SLP_IN6ADDR_ANY_INIT {{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}}} # define SLP_IN6ADDR_LOOPBACK_INIT {{{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}}} #endif Give this code a try and let me know - if it works, I'll check it in - or you can do that if you want - just let me know either way. --john jim marshall wrote: > It is failing at the constants for all the const in6_addr structs in > common/slp_net.c > > _errors on AIX_ > ../../common/slp_net.c:59: warning: excess elements in array initializer > ../../common/slp_net.c:59: warning: (near initialization for > 'in6addr_srvloc_node.u6_addr.u6_addr32') > ../../common/slp_net.c:59: warning: excess elements in array initializer > ../../common/slp_net.c:59: warning: (near initialization for > 'in6addr_srvloc_node.u6_addr.u6_addr32') > ..... > > All of the constant initializers are generating this warning in that > file. I honestly haven't even looked at it thus far. Except that I > know the layout of in6_addr is different from the Solaris one (AIX has > a different order and size). > > _aix in6_addr:_ > > struct in6_addr { > union { > u_int32_t u6_addr32[4]; > #ifdef notyet > u_int64_t u6_addr64[2]; > #endif /* notyet */ > u_int16_t u6_addr16[8]; > u_int8_t u6_addr8[16]; > } u6_addr; > }; > ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Openslp-devel mailing list Openslp-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openslp-devel