Contents of /trunk/net-tools/patches/net-tools-1.60-2.6-compilefix.patch
Parent Directory | Revision Log
Revision 153 -
(show annotations)
(download)
Tue May 8 20:52:56 2007 UTC (17 years, 5 months ago) by niro
File size: 784 byte(s)
Tue May 8 20:52:56 2007 UTC (17 years, 5 months ago) by niro
File size: 784 byte(s)
-import
1 | diff -ruN net-tools-1.60.orig/lib/x25_sr.c net-tools-1.60/lib/x25_sr.c |
2 | --- net-tools-1.60.orig/lib/x25_sr.c 2000-05-20 15:38:10.000000000 +0200 |
3 | +++ net-tools-1.60/lib/x25_sr.c 2003-10-18 20:33:31.927574928 +0200 |
4 | @@ -22,6 +22,7 @@ |
5 | #include <sys/socket.h> |
6 | #include <sys/ioctl.h> |
7 | #include <linux/x25.h> |
8 | +#include <linux/version.h> |
9 | #include <ctype.h> |
10 | #include <errno.h> |
11 | #include <netdb.h> |
12 | @@ -77,7 +78,11 @@ |
13 | rt.sigdigits=sigdigits; |
14 | |
15 | /* x25_route_struct.address isn't type struct sockaddr_x25, Why? */ |
16 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) |
17 | memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address)); |
18 | +#else |
19 | + memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address)); |
20 | +#endif |
21 | |
22 | while (*args) { |
23 | if (!strcmp(*args,"device") || !strcmp(*args,"dev")) { |