24 lines
753 B
Text
24 lines
753 B
Text
$NetBSD: patch-ac,v 1.1 2004/04/03 22:47:36 jeremy-c-reed Exp $
|
|
|
|
--- lib/x25_sr.c.orig 2000-05-20 06:38:10.000000000 -0700
|
|
+++ lib/x25_sr.c
|
|
@@ -22,6 +22,7 @@
|
|
#include <sys/socket.h>
|
|
#include <sys/ioctl.h>
|
|
#include <linux/x25.h>
|
|
+#include <linux/version.h>
|
|
#include <ctype.h>
|
|
#include <errno.h>
|
|
#include <netdb.h>
|
|
@@ -77,7 +78,11 @@ static int X25_setroute(int action, int
|
|
rt.sigdigits=sigdigits;
|
|
|
|
/* x25_route_struct.address isn't type struct sockaddr_x25, Why? */
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
|
|
memcpy(&rt.address, &sx25.sx25_addr, sizeof(x25_address));
|
|
+#else
|
|
+ memcpy(&rt.address, &sx25.sx25_addr, sizeof(struct x25_address));
|
|
+#endif
|
|
|
|
while (*args) {
|
|
if (!strcmp(*args,"device") || !strcmp(*args,"dev")) {
|