[autoconf] bugs 162,303,178: Fix 'present but can not be compiled' warnings
2007-05-09 Paul Jakma <paul.jakma@sun.com>
* configure.ac: sys/conf.h depends on sys/param.h, at least on
FBSD 6.2.
(bug #363) Should check for in_pktinfo for IRDP
2006-05-27 Paul Jakma <paul.jakma@sun.com>
* configure.ac: General cleanup of header and type checks, introducing
an internal define, QUAGGA_INCLUDES, to build up a list of
stuff to include so as to avoid 'present but cant be compiled'
warnings.
Misc additional checks of things missing according to autoscan.
Add LIBM, for bgpd's use of libm, so as to avoid burdening
LIBS, and all the binaries, with libm linkage.
Remove the bad practice of using m4 changequote(), just
quote the []'s in the case statements properly.
This should fix bugs 162, 303 and 178.
* */*.{c,h}: Update all HAVE_* to the standard autoconf namespaced
HAVE_* defines. I.e. HAVE_SA_LEN -> HAVE_STRUCT_SOCKADDR_SA_LEN,
* bgpd/Makefile.am: Add LIBM to bgpd's LDADD, for pow().
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index b7c7ccc..795ed55 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -56,7 +56,7 @@
* Given a pointer (sockaddr or void *), return the number of bytes
* taken up by the sockaddr and any padding needed for alignment.
*/
-#if defined(HAVE_SA_LEN)
+#if defined(HAVE_STRUCT_SOCKADDR_SA_LEN)
#define SAROUNDUP(X) ROUNDUP(((struct sockaddr *)(X))->sa_len)
#elif defined(HAVE_IPV6)
/*
@@ -76,7 +76,7 @@
ROUNDUP(sizeof(struct sockaddr_in)):\
(((struct sockaddr *)(X))->sa_family == AF_LINK ? \
ROUNDUP(sizeof(struct sockaddr_dl)) : sizeof(struct sockaddr)))
-#endif /* HAVE_SA_LEN */
+#endif /* HAVE_STRUCT_SOCKADDR_SA_LEN */
/* We use an additional pointer in following, pdest, rather than (DEST)
* directly, because gcc will warn if the macro is expanded and DEST is NULL,
@@ -902,7 +902,7 @@
msg.rtm.rtm_flags |= RTF_REJECT;
-#ifdef HAVE_SIN_LEN
+#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN
#define SOCKADDRSET(X,R) \
if (msg.rtm.rtm_addrs & (R)) \
{ \
@@ -918,7 +918,7 @@
memcpy (pnt, (caddr_t)(X), len); \
pnt += len; \
}
-#endif /* HAVE_SIN_LEN */
+#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
pnt = (caddr_t) msg.buf;