]> git.ozlabs.org Git - ppp.git/blobdiff - pppstats/pppstats.c
Fix it so it compiles with glibc 2 under linux
[ppp.git] / pppstats / pppstats.c
index b8784c288b9a7ca81020ca12b5d694bf189fa04d..36e1ed60dd6c7f42af3003f52496f36cdf786ee2 100644 (file)
@@ -32,7 +32,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: pppstats.c,v 1.20 1998/02/04 01:42:06 paulus Exp $";
+static char rcsid[] = "$Id: pppstats.c,v 1.22 1998/03/31 23:48:03 paulus Exp $";
 #endif
 
 #include <stdio.h>
@@ -47,15 +47,28 @@ static char rcsid[] = "$Id: pppstats.c,v 1.20 1998/02/04 01:42:06 paulus Exp $";
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>
-#include <net/ppp_defs.h>
 
 #ifndef STREAMS
 #include <sys/socket.h>                /* *BSD, Linux, NeXT, Ultrix etc. */
+#ifndef _linux_
 #include <net/if.h>
+#include <net/ppp_defs.h>
 #include <net/if_ppp.h>
+#else
+/* Linux */
+#if __GLIBC__ >= 2
+#include <net/if.h>
+#else
+#include <linux/if.h>
+#endif
+#include <linux/types.h>
+#include <linux/ppp_defs.h>
+#include <linux/if_ppp.h>
+#endif /* _linux_ */
 
 #else  /* STREAMS */
 #include <sys/stropts.h>       /* SVR4, Solaris 2, SunOS 4, OSF/1, etc. */
+#include <net/ppp_defs.h>
 #include <net/pppio.h>
 
 #endif /* STREAMS */