summaryrefslogtreecommitdiff
path: root/pppd
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@ozlabs.org>2022-08-05 14:06:33 +1000
committerGitHub <noreply@github.com>2022-08-05 14:06:33 +1000
commit33e8c95bf873cdce5ff2e2b4d8a76bdae792c699 (patch)
treef6cc2a5128f8e9960afec6189c34a564c2bd8166 /pppd
parenta75fb7b198eed50d769c80c36629f38346882cbf (diff)
downloadppp-33e8c95bf873cdce5ff2e2b4d8a76bdae792c699.tar.gz
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 <paulus@ozlabs.org>
Diffstat (limited to 'pppd')
-rw-r--r--pppd/sys-linux.c6
1 files changed, 3 insertions, 3 deletions
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 <linux/ppp-ioctl.h>
-
-#ifdef PPP_WITH_IPV6CP
#include <linux/netlink.h>
#include <linux/rtnetlink.h>
#include <linux/if_link.h>
@@ -140,7 +138,6 @@
#define RTM_NEWSTATS 92
#define RTM_GETSTATS 94
#define IFLA_STATS_LINK_64 1
-#endif /* PPP_WITH_IPV6CP */
#include <linux/if_addr.h>
/* 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 <pcap-bpf.h>