diff options
author | Paul Jakma <paul.jakma@sun.com> | 2007-05-10 02:38:51 +0000 |
---|---|---|
committer | Paul Jakma <paul.jakma@sun.com> | 2007-05-10 02:38:51 +0000 |
commit | 6f0e3f6e17687eb25b7b77c4fdc8324837d4700f (patch) | |
tree | 8a94d9212060f0f2ee7cbd0079c2687eed7348dc /zebra | |
parent | 08d3d5b398ae81de7659509f159e814d1bbd4375 (diff) |
[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().
Diffstat (limited to 'zebra')
-rw-r--r-- | zebra/interface.c | 8 | ||||
-rw-r--r-- | zebra/ioctl.c | 28 | ||||
-rw-r--r-- | zebra/kernel_socket.c | 8 | ||||
-rw-r--r-- | zebra/rt_ioctl.c | 32 | ||||
-rw-r--r-- | zebra/rt_socket.c | 16 | ||||
-rw-r--r-- | zebra/rtadv.c | 8 | ||||
-rw-r--r-- | zebra/rtadv.h | 6 | ||||
-rw-r--r-- | zebra/zserv.c | 12 |
8 files changed, 59 insertions, 59 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index 1c8d3a48..184b42a0 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -644,9 +644,9 @@ nd_dump_vty (struct vty *vty, struct interface *ifp) static void if_dump_vty (struct vty *vty, struct interface *ifp) { -#ifdef HAVE_SOCKADDR_DL +#ifdef HAVE_STRUCT_SOCKADDR_DL struct sockaddr_dl *sdl; -#endif /* HAVE_SOCKADDR_DL */ +#endif /* HAVE_STRUCT_SOCKADDR_DL */ struct connected *connected; struct listnode *node; struct route_node *rn; @@ -696,7 +696,7 @@ if_dump_vty (struct vty *vty, struct interface *ifp) if_flag_dump (ifp->flags), VTY_NEWLINE); /* Hardware address. */ -#ifdef HAVE_SOCKADDR_DL +#ifdef HAVE_STRUCT_SOCKADDR_DL sdl = &ifp->sdl; if (sdl != NULL && sdl->sdl_alen != 0) { @@ -718,7 +718,7 @@ if_dump_vty (struct vty *vty, struct interface *ifp) vty_out (vty, "%s%02x", i == 0 ? "" : ":", ifp->hw_addr[i]); vty_out (vty, "%s", VTY_NEWLINE); } -#endif /* HAVE_SOCKADDR_DL */ +#endif /* HAVE_STRUCT_SOCKADDR_DL */ /* Bandwidth in kbps */ if (ifp->bandwidth != 0) diff --git a/zebra/ioctl.c b/zebra/ioctl.c index ccb927ac..c9ec8d57 100644 --- a/zebra/ioctl.c +++ b/zebra/ioctl.c @@ -179,7 +179,7 @@ if_unset_prefix (struct interface *ifp, struct connected *ifc) return kernel_address_delete_ipv4 (ifp, ifc); } #else /* ! HAVE_NETLINK */ -#ifdef HAVE_IFALIASREQ +#ifdef HAVE_STRUCT_IFALIASREQ /* Set up interface's IP address, netmask (and broadcas? ). *BSD may has ifaliasreq structure. */ int @@ -199,7 +199,7 @@ if_set_prefix (struct interface *ifp, struct connected *ifc) memset (&addr, 0, sizeof (struct sockaddr_in)); addr.sin_addr = p->prefix; addr.sin_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN addr.sin_len = sizeof (struct sockaddr_in); #endif memcpy (&addreq.ifra_addr, &addr, sizeof (struct sockaddr_in)); @@ -207,7 +207,7 @@ if_set_prefix (struct interface *ifp, struct connected *ifc) memset (&mask, 0, sizeof (struct sockaddr_in)); masklen2ip (p->prefixlen, &mask.sin_addr); mask.sin_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN mask.sin_len = sizeof (struct sockaddr_in); #endif memcpy (&addreq.ifra_mask, &mask, sizeof (struct sockaddr_in)); @@ -237,7 +237,7 @@ if_unset_prefix (struct interface *ifp, struct connected *ifc) memset (&addr, 0, sizeof (struct sockaddr_in)); addr.sin_addr = p->prefix; addr.sin_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN addr.sin_len = sizeof (struct sockaddr_in); #endif memcpy (&addreq.ifra_addr, &addr, sizeof (struct sockaddr_in)); @@ -245,7 +245,7 @@ if_unset_prefix (struct interface *ifp, struct connected *ifc) memset (&mask, 0, sizeof (struct sockaddr_in)); masklen2ip (p->prefixlen, &mask.sin_addr); mask.sin_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN mask.sin_len = sizeof (struct sockaddr_in); #endif memcpy (&addreq.ifra_mask, &mask, sizeof (struct sockaddr_in)); @@ -335,7 +335,7 @@ if_unset_prefix (struct interface *ifp, struct connected *ifc) return 0; } -#endif /* HAVE_IFALIASREQ */ +#endif /* HAVE_STRUCT_IFALIASREQ */ #endif /* HAVE_NETLINK */ /* get interface flags */ @@ -457,7 +457,7 @@ if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc) return ret; } #else /* LINUX_IPV6 */ -#ifdef HAVE_IN6_ALIASREQ +#ifdef HAVE_STRUCT_IN6_ALIASREQ #ifndef ND6_INFINITE_LIFETIME #define ND6_INFINITE_LIFETIME 0xffffffffL #endif /* ND6_INFINITE_LIFETIME */ @@ -478,7 +478,7 @@ if_prefix_add_ipv6 (struct interface *ifp, struct connected *ifc) memset (&addr, 0, sizeof (struct sockaddr_in6)); addr.sin6_addr = p->prefix; addr.sin6_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN addr.sin6_len = sizeof (struct sockaddr_in6); #endif memcpy (&addreq.ifra_addr, &addr, sizeof (struct sockaddr_in6)); @@ -486,7 +486,7 @@ if_prefix_add_ipv6 (struct interface *ifp, struct connected *ifc) memset (&mask, 0, sizeof (struct sockaddr_in6)); masklen2ip6 (p->prefixlen, &mask.sin6_addr); mask.sin6_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN mask.sin6_len = sizeof (struct sockaddr_in6); #endif memcpy (&addreq.ifra_prefixmask, &mask, sizeof (struct sockaddr_in6)); @@ -494,7 +494,7 @@ if_prefix_add_ipv6 (struct interface *ifp, struct connected *ifc) addreq.ifra_lifetime.ia6t_vltime = 0xffffffff; addreq.ifra_lifetime.ia6t_pltime = 0xffffffff; -#ifdef HAVE_IFRA_LIFETIME +#ifdef HAVE_STRUCT_IF6_ALIASREQ_IFRA_LIFETIME addreq.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; addreq.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME; #endif @@ -522,7 +522,7 @@ if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc) memset (&addr, 0, sizeof (struct sockaddr_in6)); addr.sin6_addr = p->prefix; addr.sin6_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN addr.sin6_len = sizeof (struct sockaddr_in6); #endif memcpy (&addreq.ifra_addr, &addr, sizeof (struct sockaddr_in6)); @@ -530,12 +530,12 @@ if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc) memset (&mask, 0, sizeof (struct sockaddr_in6)); masklen2ip6 (p->prefixlen, &mask.sin6_addr); mask.sin6_family = p->family; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN mask.sin6_len = sizeof (struct sockaddr_in6); #endif memcpy (&addreq.ifra_prefixmask, &mask, sizeof (struct sockaddr_in6)); -#ifdef HAVE_IFRA_LIFETIME +#ifdef HAVE_STRUCT_IF6_ALIASREQ_IFRA_LIFETIME addreq.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME; addreq.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME; #endif @@ -557,7 +557,7 @@ if_prefix_delete_ipv6 (struct interface *ifp, struct connected *ifc) { return 0; } -#endif /* HAVE_IN6_ALIASREQ */ +#endif /* HAVE_STRUCT_IN6_ALIASREQ */ #endif /* LINUX_IPV6 */ diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index b7c7ccc1..795ed55f 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -56,7 +56,7 @@ extern struct zebra_t zebrad; * 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 @@ extern struct zebra_t zebrad; 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 @@ rtm_write (int message, 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 @@ rtm_write (int message, memcpy (pnt, (caddr_t)(X), len); \ pnt += len; \ } -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ pnt = (caddr_t) msg.buf; diff --git a/zebra/rt_ioctl.c b/zebra/rt_ioctl.c index f4997e22..a5d588c7 100644 --- a/zebra/rt_ioctl.c +++ b/zebra/rt_ioctl.c @@ -50,9 +50,9 @@ kernel_read (int sock) /* Initialization prototype of struct sockaddr_in. */ static struct sockaddr_in sin_proto = { -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sizeof (struct sockaddr_in), -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ AF_INET, 0, {0}, {0} }; #endif /* 0 */ @@ -77,9 +77,9 @@ kernel_add_route (struct prefix_ipv4 *dest, struct in_addr *gate, /* Make destination. */ memset (&sin_dest, 0, sizeof (struct sockaddr_in)); sin_dest.sin_family = AF_INET; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sin_dest.sin_len = sizeof (struct sockaddr_in); -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ sin_dest.sin_addr = dest->prefix; /* Make gateway. */ @@ -87,17 +87,17 @@ kernel_add_route (struct prefix_ipv4 *dest, struct in_addr *gate, { memset (&sin_gate, 0, sizeof (struct sockaddr_in)); sin_gate.sin_family = AF_INET; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sin_gate.sin_len = sizeof (struct sockaddr_in); -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ sin_gate.sin_addr = *gate; } memset (&sin_mask, 0, sizeof (struct sockaddr_in)); sin_mask.sin_family = AF_INET; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sin_gate.sin_len = sizeof (struct sockaddr_in); -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ masklen2ip (dest->prefixlen, &sin_mask.sin_addr); /* Set destination address, mask and gateway.*/ @@ -178,9 +178,9 @@ kernel_ioctl_ipv4 (u_long cmd, struct prefix *p, struct rib *rib, int family) /* Make destination. */ memset (&sin_dest, 0, sizeof (struct sockaddr_in)); sin_dest.sin_family = AF_INET; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sin_dest.sin_len = sizeof (struct sockaddr_in); -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ sin_dest.sin_addr = p->u.prefix4; if (CHECK_FLAG (rib->flags, ZEBRA_FLAG_BLACKHOLE)) @@ -210,9 +210,9 @@ kernel_ioctl_ipv4 (u_long cmd, struct prefix *p, struct rib *rib, int family) nexthop->rtype == NEXTHOP_TYPE_IPV4_IFINDEX) { sin_gate.sin_family = AF_INET; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sin_gate.sin_len = sizeof (struct sockaddr_in); -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ sin_gate.sin_addr = nexthop->rgate.ipv4; rtentry.rt_flags |= RTF_GATEWAY; } @@ -232,9 +232,9 @@ kernel_ioctl_ipv4 (u_long cmd, struct prefix *p, struct rib *rib, int family) nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX) { sin_gate.sin_family = AF_INET; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sin_gate.sin_len = sizeof (struct sockaddr_in); -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ sin_gate.sin_addr = nexthop->gate.ipv4; rtentry.rt_flags |= RTF_GATEWAY; } @@ -269,9 +269,9 @@ kernel_ioctl_ipv4 (u_long cmd, struct prefix *p, struct rib *rib, int family) memset (&sin_mask, 0, sizeof (struct sockaddr_in)); sin_mask.sin_family = AF_INET; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sin_mask.sin_len = sizeof (struct sockaddr_in); -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ masklen2ip (p->prefixlen, &sin_mask.sin_addr); /* Set destination address, mask and gateway.*/ diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c index f9f194eb..0182fbd6 100644 --- a/zebra/rt_socket.c +++ b/zebra/rt_socket.c @@ -78,18 +78,18 @@ kernel_rtm_ipv4 (int cmd, struct prefix *p, struct rib *rib, int family) memset (&sin_dest, 0, sizeof (struct sockaddr_in)); sin_dest.sin_family = AF_INET; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sin_dest.sin_len = sizeof (struct sockaddr_in); -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ sin_dest.sin_addr = p->u.prefix4; memset (&sin_mask, 0, sizeof (struct sockaddr_in)); memset (&sin_gate, 0, sizeof (struct sockaddr_in)); sin_gate.sin_family = AF_INET; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sin_gate.sin_len = sizeof (struct sockaddr_in); -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ /* Make gateway. */ for (nexthop = rib->nexthop; nexthop; nexthop = nexthop->next) @@ -147,9 +147,9 @@ kernel_rtm_ipv4 (int cmd, struct prefix *p, struct rib *rib, int family) { masklen2ip (p->prefixlen, &sin_mask.sin_addr); sin_mask.sin_family = AF_INET; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sin_mask.sin_len = sin_masklen (sin_mask.sin_addr); -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ mask = &sin_mask; } } @@ -327,9 +327,9 @@ kernel_rtm_ipv6_multipath (int cmd, struct prefix *p, struct rib *rib, memset (&sin_gate, 0, sizeof (struct sockaddr_in6)); sin_gate.sin6_family = AF_INET6; -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN sin_gate.sin6_len = sizeof (struct sockaddr_in6); -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ /* Make gateway. */ for (nexthop = rib->nexthop; nexthop; nexthop = nexthop->next) diff --git a/zebra/rtadv.c b/zebra/rtadv.c index 83c3e777..4bdb83d5 100644 --- a/zebra/rtadv.c +++ b/zebra/rtadv.c @@ -157,9 +157,9 @@ rtadv_send_packet (int sock, struct interface *ifp) struct cmsghdr *cmsgptr; struct in6_pktinfo *pkt; struct sockaddr_in6 addr; -#ifdef HAVE_SOCKADDR_DL +#ifdef HAVE_STRUCT_SOCKADDR_DL struct sockaddr_dl *sdl; -#endif /* HAVE_SOCKADDR_DL */ +#endif /* HAVE_STRUCT_SOCKADDR_DL */ static void *adata = NULL; unsigned char buf[RTADV_MSG_SIZE]; struct nd_router_advert *rtadv; @@ -285,7 +285,7 @@ rtadv_send_packet (int sock, struct interface *ifp) } /* Hardware address. */ -#ifdef HAVE_SOCKADDR_DL +#ifdef HAVE_STRUCT_SOCKADDR_DL sdl = &ifp->sdl; if (sdl != NULL && sdl->sdl_alen != 0) { @@ -304,7 +304,7 @@ rtadv_send_packet (int sock, struct interface *ifp) memcpy (buf + len, ifp->hw_addr, ifp->hw_addr_len); len += ifp->hw_addr_len; } -#endif /* HAVE_SOCKADDR_DL */ +#endif /* HAVE_STRUCT_SOCKADDR_DL */ msg.msg_name = (void *) &addr; msg.msg_namelen = sizeof (struct sockaddr_in6); diff --git a/zebra/rtadv.h b/zebra/rtadv.h index 0a65df23..36655037 100644 --- a/zebra/rtadv.h +++ b/zebra/rtadv.h @@ -66,7 +66,7 @@ extern void rtadv_init (void); #define ND_OPT_HA_INFORMATION 8 /* HA Information Option */ #endif -#ifndef HAVE_ND_OPT_ADV_INTERVAL +#ifndef HAVE_STRUCT_ND_OPT_ADV_INTERVAL struct nd_opt_adv_interval { /* Advertisement interval option */ uint8_t nd_opt_ai_type; uint8_t nd_opt_ai_len; @@ -74,7 +74,7 @@ struct nd_opt_adv_interval { /* Advertisement interval option */ uint32_t nd_opt_ai_interval; } __attribute__((__packed__)); #else -#ifndef HAVE_ND_OPT_ADV_INTERVAL_AI_FIELDS +#ifndef HAVE_STRUCT_ND_OPT_ADV_INTERVAL_ND_OPT_AI_TYPE /* fields may have to be renamed */ #define nd_opt_ai_type nd_opt_adv_interval_type #define nd_opt_ai_len nd_opt_adv_interval_len @@ -83,7 +83,7 @@ struct nd_opt_adv_interval { /* Advertisement interval option */ #endif #endif -#ifndef HAVE_ND_OPT_HOMEAGENT_INFO +#ifndef HAVE_STRUCT_ND_OPT_HOMEAGENT_INFO struct nd_opt_homeagent_info { /* Home Agent info */ u_int8_t nd_opt_hai_type; u_int8_t nd_opt_hai_len; diff --git a/zebra/zserv.c b/zebra/zserv.c index 22a6bed2..ef79eaad 100644 --- a/zebra/zserv.c +++ b/zebra/zserv.c @@ -166,13 +166,13 @@ zsend_interface_add (struct zserv *client, struct interface *ifp) stream_putl (s, ifp->mtu); stream_putl (s, ifp->mtu6); stream_putl (s, ifp->bandwidth); -#ifdef HAVE_SOCKADDR_DL +#ifdef HAVE_STRUCT_SOCKADDR_DL stream_put (s, &ifp->sdl, sizeof (ifp->sdl)); #else stream_putl (s, ifp->hw_addr_len); if (ifp->hw_addr_len) stream_put (s, ifp->hw_addr, ifp->hw_addr_len); -#endif /* HAVE_SOCKADDR_DL */ +#endif /* HAVE_STRUCT_SOCKADDR_DL */ /* Write packet size. */ stream_putw_at (s, 0, stream_get_endp (s)); @@ -1355,9 +1355,9 @@ zebra_serv () memset (&addr, 0, sizeof (struct sockaddr_in)); addr.sin_family = AF_INET; addr.sin_port = htons (ZEBRA_PORT); -#ifdef HAVE_SIN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN addr.sin_len = sizeof (struct sockaddr_in); -#endif /* HAVE_SIN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ addr.sin_addr.s_addr = htonl (INADDR_LOOPBACK); sockopt_reuseaddr (accept_sock); @@ -1426,11 +1426,11 @@ zebra_serv_un (const char *path) memset (&serv, 0, sizeof (struct sockaddr_un)); serv.sun_family = AF_UNIX; strncpy (serv.sun_path, path, strlen (path)); -#ifdef HAVE_SUN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN len = serv.sun_len = SUN_LEN(&serv); #else len = sizeof (serv.sun_family) + strlen (serv.sun_path); -#endif /* HAVE_SUN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_UN_SUN_LEN */ ret = bind (sock, (struct sockaddr *) &serv, len); if (ret < 0) |