diff options
4 files changed, 65 insertions, 14 deletions
diff --git a/sys-block/iscsitarget/ChangeLog b/sys-block/iscsitarget/ChangeLog index caf87122e795..ec199a136c70 100644 --- a/sys-block/iscsitarget/ChangeLog +++ b/sys-block/iscsitarget/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-block/iscsitarget # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/ChangeLog,v 1.21 2009/01/15 01:28:20 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/ChangeLog,v 1.22 2009/03/25 15:19:03 flameeyes Exp $ + + 25 Mar 2009; Diego E. Pettenò <flameeyes@gentoo.org> + files/iscsitarget-0.4.17+linux-2.6.28.patch, + +files/iscsitarget-0.4.17+linux-2.6.29.patch, iscsitarget-0.4.17.ebuild: + Add one more patch to fix building with kernel 2.6.29, and update the + 2.6.28 patch to stay inline with my local repository. 15 Jan 2009; Diego E. Pettenò <flameeyes@gentoo.org> files/iscsitarget-0.4.17+linux-2.6.28.patch: diff --git a/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.28.patch b/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.28.patch index ec35cd526f4c..1f57afdba42c 100644 --- a/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.28.patch +++ b/sys-block/iscsitarget/files/iscsitarget-0.4.17+linux-2.6.28.patch @@ -1,7 +1,7 @@ -From c5e70fc826aad5efb786c47d294e3c0c76246d63 Mon Sep 17 00:00:00 2001 +From 57551cb0529b48411f8f63a002882b7e1cf792f8 Mon Sep 17 00:00:00 2001 From: =?utf-8?q?Diego=20E.=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com> -Date: Sat, 3 Jan 2009 00:09:43 +0100 -Subject: [PATCH] Fix building with Linux kernel 2.6.28 and later. +Date: Wed, 25 Mar 2009 16:14:26 +0100 +Subject: [PATCH 1/2] Fix building with Linux kernel 2.6.28 and later. With changeset 30c40d2c01f68c7eb1a41ab3552bdaf5dbf300d4 of the Linux kernel, the functions open_bdev_excl and close_bdev_excl were replaced with @@ -11,19 +11,23 @@ The new interface uses fmode_t instead of integer flags to carry on the opening mode for a block device, thus require some minor changes in the calls. --- - kernel/block-io.c | 21 +++++++++++++++++++++ - 1 files changed, 21 insertions(+), 0 deletions(-) + kernel/block-io.c | 22 ++++++++++++++++++++++ + 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/kernel/block-io.c b/kernel/block-io.c -index e4a25f7..2c5f6f6 100644 +index e4a25f7..af10c7e 100644 --- a/kernel/block-io.c +++ b/kernel/block-io.c -@@ -18,6 +18,14 @@ +@@ -13,11 +13,18 @@ + #include <linux/blkdev.h> + #include <linux/parser.h> + #include <linux/buffer_head.h> ++#include <linux/version.h> + + #include "iscsi.h" #include "iscsi_dbg.h" #include "iotype.h" -+#include <linux/version.h> -+ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28) +# define HAVE_OPEN_BDEV_EXCLUSIVE 1 +#else @@ -33,7 +37,7 @@ index e4a25f7..2c5f6f6 100644 struct blockio_data { char *path; struct block_device *bdev; -@@ -154,14 +160,22 @@ blockio_open_path(struct iet_volume *volume, const char *path) +@@ -154,14 +161,22 @@ blockio_open_path(struct iet_volume *volume, const char *path) { struct blockio_data *bio_data = volume->private; struct block_device *bdev; @@ -56,7 +60,7 @@ index e4a25f7..2c5f6f6 100644 if (IS_ERR(bdev)) { err = PTR_ERR(bdev); eprintk("Can't open device %s, error %d\n", path, err); -@@ -323,9 +337,16 @@ static void +@@ -323,9 +338,16 @@ static void blockio_detach(struct iet_volume *volume) { struct blockio_data *bio_data = volume->private; @@ -74,5 +78,5 @@ index e4a25f7..2c5f6f6 100644 kfree(volume->private); -- -1.6.0.6 +1.6.2 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 + diff --git a/sys-block/iscsitarget/iscsitarget-0.4.17.ebuild b/sys-block/iscsitarget/iscsitarget-0.4.17.ebuild index 4ed87931a7f3..26cde275571f 100644 --- a/sys-block/iscsitarget/iscsitarget-0.4.17.ebuild +++ b/sys-block/iscsitarget/iscsitarget-0.4.17.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/iscsitarget-0.4.17.ebuild,v 1.2 2009/01/02 23:21:17 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-block/iscsitarget/iscsitarget-0.4.17.ebuild,v 1.3 2009/03/25 15:19:03 flameeyes Exp $ inherit linux-mod eutils flag-o-matic @@ -25,6 +25,7 @@ src_unpack() { epatch "${FILESDIR}"/${PN}-0.4.15-isns-set-scn-flag.patch #180619 epatch "${FILESDIR}"/${PN}-0.4.17-build.patch epatch "${FILESDIR}"/${PN}-0.4.17+linux-2.6.28.patch #252608 + epatch "${FILESDIR}"/${PN}-0.4.17+linux-2.6.29.patch convert_to_m "${S}"/Makefile } |