diff options
Diffstat (limited to 'sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.29.patch')
-rw-r--r-- | sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.29.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.29.patch b/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.29.patch new file mode 100644 index 000000000000..092fdc3fd9c4 --- /dev/null +++ b/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.29.patch @@ -0,0 +1,40 @@ +From 81373580a641732a7e4610c3d39af0c68007b892 Mon Sep 17 00:00:00 2001 +From: =?utf-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com> +Date: Wed, 25 Mar 2009 16:14:46 +0100 +Subject: [PATCH 2/2] Fix building with Linux kernel 2.6.29 and later. + +When building for Linux 2.6.29 or later, instead of using the NIP6 +macro (that has been removed) use the new %p6 format specifier. +--- + kernel/conn.c | 6 ++++++ + 1 files changed, 6 insertions(+), 0 deletions(-) + +diff --git a/kernel/conn.c b/kernel/conn.c +index f96e2b6..ab561f9 100644 +--- a/kernel/conn.c ++++ b/kernel/conn.c +@@ -6,6 +6,7 @@ + + #include <linux/file.h> + #include <linux/ip.h> ++#include <linux/version.h> + #include <net/tcp.h> + + #include "iscsi.h" +@@ -47,8 +48,13 @@ void conn_info_show(struct seq_file *seq, struct iscsi_session *session) + break; + case AF_INET6: + snprintf(buf, sizeof(buf), ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++ "[%p6]", ++ &(inet6_sk(sk)->daddr)); ++#else + "[%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x]", + NIP6(inet6_sk(sk)->daddr)); ++#endif + break; + default: + break; +-- +1.6.2 + |