From 6f0e3f6e17687eb25b7b77c4fdc8324837d4700f Mon Sep 17 00:00:00 2001 From: Paul Jakma Date: Thu, 10 May 2007 02:38:51 +0000 Subject: [autoconf] bugs 162,303,178: Fix 'present but can not be compiled' warnings 2007-05-09 Paul Jakma * 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 * 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(). --- ripd/ripd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'ripd/ripd.c') diff --git a/ripd/ripd.c b/ripd/ripd.c index 7c463d50..75ac2159 100644 --- a/ripd/ripd.c +++ b/ripd/ripd.c @@ -1352,9 +1352,9 @@ rip_create_socket (struct sockaddr_in *from) { addr.sin_family = AF_INET; addr.sin_addr.s_addr = INADDR_ANY; -#ifdef HAVE_SINLEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN addr.sin_len = sizeof (struct sockaddr_in); -#endif /* HAVE_SINLEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ } else { memcpy(&addr, from, sizeof(addr)); } @@ -1457,9 +1457,9 @@ rip_send_packet (u_char * buf, int size, struct sockaddr_in *to, /* Make destination address. */ memset (&sin, 0, sizeof (struct sockaddr_in)); sin.sin_family = AF_INET; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sin.sin_len = sizeof (struct sockaddr_in); -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ /* When destination is specified, use it's port and address. */ if (to) @@ -1479,9 +1479,9 @@ rip_send_packet (u_char * buf, int size, struct sockaddr_in *to, from.sin_family = AF_INET; from.sin_port = htons (RIP_PORT_DEFAULT); from.sin_addr = ifc->address->u.prefix4; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN from.sin_len = sizeof (struct sockaddr_in); -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ /* * we have to open a new socket for each packet because this -- cgit v1.2.1