X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fsys-linux.c;h=a8d6cd95bee442f9e86af28578b28d4318fb8768;hb=7a3f478a4b7128d4f70ea64d99fedec766b1c009;hp=561b150f2950a59777925303455a283dee174d27;hpb=a2ecd2a8241e1063073e79d949ef6d1e553513b1;p=ppp.git diff --git a/pppd/sys-linux.c b/pppd/sys-linux.c index 561b150..a8d6cd9 100644 --- a/pppd/sys-linux.c +++ b/pppd/sys-linux.c @@ -131,16 +131,6 @@ #include #include #include - -/* Attempt at retaining compile-support with older than 4.7 kernels, or kernels - * where RTM_NEWSTATS isn't defined for whatever reason. - */ -#ifndef RTM_NEWSTATS -#define RTM_NEWSTATS 92 -#define RTM_GETSTATS 94 -#define IFLA_STATS_LINK_64 1 -#endif - #include /* glibc versions prior to 2.24 do not define SOL_NETLINK */ @@ -1776,6 +1766,7 @@ get_ppp_stats_ioctl(int u, struct pppd_stats *stats) static int get_ppp_stats_rtnetlink(int u, struct pppd_stats *stats) { +#ifdef RTM_NEWSTATS static int fd = -1; struct { @@ -1825,6 +1816,7 @@ get_ppp_stats_rtnetlink(int u, struct pppd_stats *stats) err: close(fd); fd = -1; +#endif return 0; }