diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2021-03-29 08:33:52 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2021-03-29 08:38:07 +0100 |
commit | b90d145c70b50b5b906e1d660647d6189cf51ad4 (patch) | |
tree | 284403fca7c8321316819fd27084ab976d0faffe /net-libs/libiscsi | |
parent | sys-apps/portage: Bump to version 3.0.18 (diff) | |
download | gentoo-b90d145c70b50b5b906e1d660647d6189cf51ad4.tar.gz gentoo-b90d145c70b50b5b906e1d660647d6189cf51ad4.tar.bz2 gentoo-b90d145c70b50b5b906e1d660647d6189cf51ad4.zip |
net-libs/libiscsi: fix -fno-common build failures
Reported-by: Leonid Kopylov
Closes: https://bugs.gentoo.org/778419
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'net-libs/libiscsi')
-rw-r--r-- | net-libs/libiscsi/files/libiscsi-1.18.0-fno-common-2.patch | 53 | ||||
-rw-r--r-- | net-libs/libiscsi/files/libiscsi-1.18.0-fno-common-3.patch | 34 | ||||
-rw-r--r-- | net-libs/libiscsi/libiscsi-1.18.0.ebuild | 6 |
3 files changed, 92 insertions, 1 deletions
diff --git a/net-libs/libiscsi/files/libiscsi-1.18.0-fno-common-2.patch b/net-libs/libiscsi/files/libiscsi-1.18.0-fno-common-2.patch new file mode 100644 index 000000000000..abb561982ba8 --- /dev/null +++ b/net-libs/libiscsi/files/libiscsi-1.18.0-fno-common-2.patch @@ -0,0 +1,53 @@ +From ea89dcdbf167acd634300296172926c2e8d85804 Mon Sep 17 00:00:00 2001 +From: Cole Robinson <crobinso@redhat.com> +Date: Sat, 15 Feb 2020 18:03:11 -0500 +Subject: [PATCH] test-tool: Use 'extern int' in headers + +Without this, linking fails on Fedora rawhide. Example: + +... +/usr/bin/ld: test_async_lu_reset_simple.o:/root/libiscsi/libiscsi.git/test-tool/iscsi-support.h:59: multiple definition of `param_list_len_err_ascqs'; iscsi-test-cu.o:/root/libiscsi/libiscsi.git/test-tool/iscsi-support.h:59: first defined here +/usr/bin/ld: test_async_lu_reset_simple.o:/root/libiscsi/libiscsi.git/test-tool/iscsi-support.h:58: multiple definition of `invalid_cdb_ascqs'; iscsi-test-cu.o:/root/libiscsi/libiscsi.git/test-tool/iscsi-support.h:58: first defined here +... + +Signed-off-by: Cole Robinson <crobinso@redhat.com> +--- + test-tool/iscsi-support.h | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/test-tool/iscsi-support.h b/test-tool/iscsi-support.h +index 7aa9e45..9c3a461 100644 +--- a/test-tool/iscsi-support.h ++++ b/test-tool/iscsi-support.h +@@ -53,17 +53,17 @@ extern const char *initiatorname2; + #define EXPECT_RESERVATION_CONFLICT SCSI_STATUS_RESERVATION_CONFLICT, 0, NULL, 0 + #define EXPECT_COPY_ABORTED SCSI_STATUS_CHECK_CONDITION, SCSI_SENSE_COPY_ABORTED, copy_aborted_ascqs, 3 + +-int no_medium_ascqs[3]; +-int lba_oob_ascqs[1]; +-int invalid_cdb_ascqs[2]; +-int param_list_len_err_ascqs[1]; +-int too_many_desc_ascqs[2]; +-int unsupp_desc_code_ascqs[2]; +-int write_protect_ascqs[3]; +-int sanitize_ascqs[1]; +-int removal_ascqs[1]; +-int miscompare_ascqs[1]; +-int copy_aborted_ascqs[3]; ++extern int no_medium_ascqs[3]; ++extern int lba_oob_ascqs[1]; ++extern int invalid_cdb_ascqs[2]; ++extern int param_list_len_err_ascqs[1]; ++extern int too_many_desc_ascqs[2]; ++extern int unsupp_desc_code_ascqs[2]; ++extern int write_protect_ascqs[3]; ++extern int sanitize_ascqs[1]; ++extern int removal_ascqs[1]; ++extern int miscompare_ascqs[1]; ++extern int copy_aborted_ascqs[3]; + + extern int loglevel; + #define LOG_SILENT 0 +-- +2.31.1 + diff --git a/net-libs/libiscsi/files/libiscsi-1.18.0-fno-common-3.patch b/net-libs/libiscsi/files/libiscsi-1.18.0-fno-common-3.patch new file mode 100644 index 000000000000..e3c34aa6fdbc --- /dev/null +++ b/net-libs/libiscsi/files/libiscsi-1.18.0-fno-common-3.patch @@ -0,0 +1,34 @@ +--- a/test-tool/iscsi-support.c ++++ b/test-tool/iscsi-support.c +@@ -119,7 +119,8 @@ int readonly; + int sbc3_support; + int maximum_transfer_length; + +-int (*real_iscsi_queue_pdu)(struct iscsi_context *iscsi, struct iscsi_pdu *pdu); ++static int (*real_iscsi_queue_pdu)(struct iscsi_context *iscsi, struct iscsi_pdu *pdu); ++int (*local_iscsi_queue_pdu)(struct iscsi_context *iscsi, struct iscsi_pdu *pdu); + + static const unsigned char zeroBlock[4096]; + +--- a/test-tool/iscsi-support.h ++++ b/test-tool/iscsi-support.h +@@ -779,7 +779,7 @@ struct iscsi_async_state { + void wait_until_test_finished(struct iscsi_context *iscsi, struct iscsi_async_state *test_state); + + struct iscsi_pdu; +-int (*local_iscsi_queue_pdu)(struct iscsi_context *iscsi, struct iscsi_pdu *pdu); ++extern int (*local_iscsi_queue_pdu)(struct iscsi_context *iscsi, struct iscsi_pdu *pdu); + + struct scsi_command_descriptor *get_command_descriptor(int opcode, int sa); + +--- a/test-tool/iscsi-test-cu.c ++++ b/test-tool/iscsi-test-cu.c +@@ -63,7 +63,7 @@ static unsigned int maxsectors; + * this allows us to redefine how PDU are queued, at times, for + * testing purposes + */ +-int (*real_iscsi_queue_pdu)(struct iscsi_context *iscsi, struct iscsi_pdu *pdu); ++int (*real_iscsi_queue_pdu)(struct iscsi_context *iscsi, struct iscsi_pdu *pdu) = NULL; + + /***************************************************************** + * diff --git a/net-libs/libiscsi/libiscsi-1.18.0.ebuild b/net-libs/libiscsi/libiscsi-1.18.0.ebuild index d5f2c942c2dc..444ee4b744fd 100644 --- a/net-libs/libiscsi/libiscsi-1.18.0.ebuild +++ b/net-libs/libiscsi/libiscsi-1.18.0.ebuild @@ -22,7 +22,11 @@ LICENSE="GPL-2 LGPL-2" RDEPEND="dev-libs/libgcrypt:0=" DEPEND="${RDEPEND}" -PATCHES=( "${FILESDIR}"/${P}-fno-common.patch ) +PATCHES=( + "${FILESDIR}"/${P}-fno-common.patch + "${FILESDIR}"/${P}-fno-common-2.patch + "${FILESDIR}"/${P}-fno-common-3.patch +) src_prepare() { default |