Bug#1284: netbase: some compile problems
Package: netbase
Version: 1.14-1
net-tools-1.2.0 doesn't compile with the 1.3.20 kernel includes.
The following includes are needed:
<net/if_arp.h> for arp.c, rarp.c, lib/ppp.c, lib/slip.c
<linux/route.h> for route.c
These includes exist in 1.2.11, so adding them with the patch
below should not break compiles with older kernel includes.
-- cut me --
diff -r -u net-tools-1.2.0-orig/arp.c net-tools-1.2.0/arp.c
--- net-tools-1.2.0-orig/arp.c Tue Apr 4 22:58:46 1995
+++ net-tools-1.2.0/arp.c Fri Aug 25 21:13:32 1995
@@ -22,6 +22,7 @@
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <net/if.h>
+#include <net/if_arp.h>
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
diff -r -u net-tools-1.2.0-orig/lib/ppp.c net-tools-1.2.0/lib/ppp.c
--- net-tools-1.2.0-orig/lib/ppp.c Sun Apr 2 16:09:43 1995
+++ net-tools-1.2.0/lib/ppp.c Fri Aug 25 21:10:23 1995
@@ -23,6 +23,7 @@
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <linux/if.h>
+#include <linux/if_arp.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
diff -r -u net-tools-1.2.0-orig/lib/slip.c net-tools-1.2.0/lib/slip.c
--- net-tools-1.2.0-orig/lib/slip.c Sun Apr 2 16:10:01 1995
+++ net-tools-1.2.0/lib/slip.c Fri Aug 25 21:08:37 1995
@@ -23,6 +23,7 @@
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <linux/if.h>
+#include <linux/if_arp.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
diff -r -u net-tools-1.2.0-orig/rarp.c net-tools-1.2.0/rarp.c
--- net-tools-1.2.0-orig/rarp.c Tue Apr 4 22:59:24 1995
+++ net-tools-1.2.0/rarp.c Fri Aug 25 21:20:42 1995
@@ -11,6 +11,7 @@
*/
#include <sys/types.h>
#include <sys/socket.h>
+#include <linux/if_arp.h>
#include <sys/ioctl.h>
#include <arpa/inet.h>
#include <netinet/in.h>
diff -r -u net-tools-1.2.0-orig/route.c net-tools-1.2.0/route.c
--- net-tools-1.2.0-orig/route.c Tue Apr 4 22:59:33 1995
+++ net-tools-1.2.0/route.c Fri Aug 25 21:15:32 1995
@@ -14,6 +14,7 @@
* Changes by Linus Torvalds
* Further changes by Alan Cox to add the new mtu/window stuff
*/
+#include <linux/route.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
-- ouch! --
Ray
--
J.H.M. Dassen | RUMOUR Believe all you hear. Your world may
jDassen@wi.LeidenUniv.Nl | not be a better one than the one the blocks
Dassen@stpc.wi.LeidenUniv.Nl | live in but it'll be a sight more vivid.
| - The Hipcrime Vocab by Chad C. Mulligan
Reply to: