Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/bsd/ppp/usr.sbin/pppd Make this compile without -DI...



details:   https://anonhg.NetBSD.org/src/rev/49f08639de2e
branches:  trunk
changeset: 979811:49f08639de2e
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jan 11 21:45:22 2021 +0000

description:
Make this compile without -DINET6 (Kurt Schreiner)

diffstat:

 external/bsd/ppp/usr.sbin/pppd/sys-bsd.c |  18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)

diffs (65 lines):

diff -r 2c08658e49b1 -r 49f08639de2e external/bsd/ppp/usr.sbin/pppd/sys-bsd.c
--- a/external/bsd/ppp/usr.sbin/pppd/sys-bsd.c  Mon Jan 11 20:31:34 2021 +0000
+++ b/external/bsd/ppp/usr.sbin/pppd/sys-bsd.c  Mon Jan 11 21:45:22 2021 +0000
@@ -121,6 +121,8 @@
 #endif
 #include <ifaddrs.h>
 
+#ifdef INET6
+
 #define s6_addr32 __u6_addr.__u6_addr32        /* Non-standard */
 
 #define IN6_SOCKADDR_FROM_EUI64(s, eui64) do { \
@@ -146,8 +148,10 @@
        sin6.s6_addr16[0] = htons(0xfe80);                      \
        eui64_copy(eui64, sin6.s6_addr32[2]);                   \
 } while (/*CONSTCOND*/0)
-#endif
-#endif
+#endif /* __KAME__ */
+#endif /* IN6_LLADDR_FROM_EUI64 */
+
+#endif /* INET6 */
 
 #if RTM_VERSION >= 3
 #include <sys/param.h>
@@ -201,8 +205,9 @@
 #endif /* INET6 */
 static u_int32_t ifaddrs[2];   /* local and remote addresses we set */
 static u_int32_t default_route_gateway;        /* gateway addr for default route */
-static eui64_t  default_route_gateway6; /* Gateway for default IPv6 route added
-*/ 
+#ifdef INET6
+static eui64_t  default_route_gateway6; /* Gateway for default IPv6 route added */
+#endif /* INET6 */
 static u_int32_t proxy_arp_addr;       /* remote addr for proxy arp */
 
 /* Prototypes for procedures local to this file. */
@@ -307,8 +312,10 @@
        cifaddr(0, ifaddrs[0], ifaddrs[1]);
     if (default_route_gateway)
        cifdefaultroute(0, 0, default_route_gateway);
+#ifdef INET6
     if (default_route_gateway6.e32[0] != 0 || default_route_gateway6.e32[1] != 0)
        cif6defaultroute(0, default_route_gateway6, default_route_gateway6);
+#endif
     if (proxy_arp_addr)
        cifproxyarp(0, proxy_arp_addr);
     doing_cleanup = 0;
@@ -1659,6 +1666,7 @@
 }
 
 
+#ifdef INET6
 /*
  * dodefaultroute - assign/clear a default route through the address given.
  */
@@ -1725,6 +1733,8 @@
        return dodefaultroute6(u, l, g, 'c');
 }
 
+#endif
+
 #if RTM_VERSION >= 3
 
 /*



Home | Main Index | Thread Index | Old Index