Hi,

The autoconf 2.68 have some problem with parsing the pointer syntax '->' , such as the opensolaris patch: pidgin-14-ifaddrs.diff:

+AC_CHECK_MEMBERS(struct ifaddrs.ifa_addr->ss_family,[],[],[[ #include <ifaddrs.h>
+#include <net/if.h> ]])


After the command: aclocal $ACLOCAL_FLAGS -I . with configure.ac, the failure output is as followed:

configure.ac:164: error: AC_CHECK_MEMBER: requires literal arguments
/builds/hudson/workspace/nightly-update/build/i386/components/autoconf/autoconf-2.68/lib/autoconf/types.m4:880: AC_CHECK_MEMBER is expanded from... /builds/hudson/workspace/nightly-update/build/i386/components/autoconf/autoconf-2.68/lib/autoconf/types.m4:913: AC_CHECK_MEMBERS is expanded from...
configure.ac:164: the top level
autom4te: /usr/bin/gm4 failed with exit status: 1
aclocal-1.10: autom4te failed with exit status: 1


Instead of autoconf 2.68 , the older version 2.63 can work well.

Can anybody  give some information about it?  Thanks in advance!
--- pidgin-2.7.0/libpurple/network.c.old        2010-05-19 16:14:46.440830715 
+0800
+++ pidgin-2.7.0/libpurple/network.c    2010-05-19 16:38:25.005674810 +0800
@@ -57,6 +57,16 @@
 #include <idna.h>
 #endif
 
+/* Since OpenSolaris build 137, RFC2553 is supported
+ * so ifa_addr member of "struct ifaddrs" has type
+ * "struct sockaddr_storage" 
+ */
+#ifdef HAVE_STRUCT_IFADDRS_IFA_ADDR__SS_FAMILY
+#define ADDR_FAMILY_MEMBER ss_family
+#else
+#define ADDR_FAMILY_MEMBER sa_family
+#endif
+
 /*
  * Calling sizeof(struct ifreq) isn't always correct on
  * Mac OS X (and maybe others).
@@ -219,7 +229,7 @@
        }
 
        for (ifa = start; ifa; ifa = ifa->ifa_next) {
-               int family = ifa->ifa_addr ? ifa->ifa_addr->sa_family : 
AF_UNSPEC;
+               int family = ifa->ifa_addr ? ifa->ifa_addr->ADDR_FAMILY_MEMBER: 
AF_UNSPEC;
                char host[INET6_ADDRSTRLEN];
                const char *tmp = NULL;
 
@@ -265,7 +275,7 @@
                ifr = (struct ifreq *)tmp;
                tmp += HX_SIZE_OF_IFREQ(*ifr);
 
-               if (ifr->ifr_addr.sa_family == AF_INET) {
+               if (ifr->ifr_addr.ADDR_FAMILY_MEMBER == AF_INET) {
                        struct sockaddr_in *sinptr = (struct sockaddr_in 
*)&ifr->ifr_addr;
 
                        inet_ntop(AF_INET, &sinptr->sin_addr, dst,
_______________________________________________
Autoconf mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to