From: Paul Mackerras Date: Fri, 5 Aug 2022 04:06:33 +0000 (+1000) Subject: pppd: Fix compilation on Linux when IPV6 is disabled (#360) X-Git-Tag: ppp-2.5.0~34 X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=commitdiff_plain;h=33e8c95bf873cdce5ff2e2b4d8a76bdae792c699;ds=sidebyside pppd: Fix compilation on Linux when IPV6 is disabled (#360) This rearranges the PPP_WITH_IPV6CP guards added in commit 80b8744eb42c ("Changing INET6 to PPP_WITH_IPV6CP and adding configure option", 2021-08-06) so that we (a) always include the rtnetlink headers, since we need them for get_ppp_stats_rtnetlink(), and (b) don't include eui64.h unless we have IPV6 support. Fixes: 80b8744eb42c ("Changing INET6 to PPP_WITH_IPV6CP and adding configure option") Signed-off-by: Paul Mackerras --- diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index dda8772..ff3a249 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -128,8 +128,6 @@ #include - -#ifdef PPP_WITH_IPV6CP #include #include #include @@ -140,7 +138,6 @@ #define RTM_NEWSTATS 92 #define RTM_GETSTATS 94 #define IFLA_STATS_LINK_64 1 -#endif /* PPP_WITH_IPV6CP */ #include /* glibc versions prior to 2.24 do not define SOL_NETLINK */ @@ -157,7 +154,10 @@ #include "pppd.h" #include "fsm.h" #include "ipcp.h" + +#ifdef PPP_WITH_IPV6CP #include "eui64.h" +#endif /* PPP_WITH_IPV6CP */ #ifdef PPP_WITH_FILTER #include