summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakov Smolic <jakov.smolic@sartura.hr>2021-01-01 19:04:24 +0100
committerDavid Seifert <soap@gentoo.org>2021-01-01 19:04:24 +0100
commite547354a2545379b5cdacbd8118c866ca768559c (patch)
tree15ebbebb7880817bd279821efc218deada98ed62 /sys-block/tgt
parentnet-analyzer/nagios-plugins-snmp: Fix build with gcc-10 (diff)
downloadgentoo-e547354a2545379b5cdacbd8118c866ca768559c.tar.gz
gentoo-e547354a2545379b5cdacbd8118c866ca768559c.tar.bz2
gentoo-e547354a2545379b5cdacbd8118c866ca768559c.zip
sys-block/tgt: Fix build with gcc-10
Closes: https://bugs.gentoo.org/709638 Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr> Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sys-block/tgt')
-rw-r--r--sys-block/tgt/files/tgt-1.0.79-fno-common.patch22
-rw-r--r--sys-block/tgt/tgt-1.0.79.ebuild12
2 files changed, 29 insertions, 5 deletions
diff --git a/sys-block/tgt/files/tgt-1.0.79-fno-common.patch b/sys-block/tgt/files/tgt-1.0.79-fno-common.patch
new file mode 100644
index 000000000000..08933df021d8
--- /dev/null
+++ b/sys-block/tgt/files/tgt-1.0.79-fno-common.patch
@@ -0,0 +1,22 @@
+--- a/usr/iscsi/iscsid.c
++++ b/usr/iscsi/iscsid.c
+@@ -1074,7 +1074,7 @@ void iscsi_rsp_set_residual(struct iscsi_cmd_rsp *rsp, struct scsi_cmd *scmd)
+ struct iscsi_sense_data {
+ uint16_t length;
+ uint8_t data[0];
+-} __packed;
++} __attribute__((__packed__));
+
+ static int iscsi_cmd_rsp_build(struct iscsi_task *task)
+ {
+--- a/usr/iscsi/iser.c
++++ b/usr/iscsi/iser.c
+@@ -92,7 +92,7 @@ char *iser_portal_addr;
+ struct iscsi_sense_data {
+ uint16_t length;
+ uint8_t data[0];
+-} __packed;
++} __attribute__((__packed__));
+
+ static size_t buf_pool_sz_mb = DEFAULT_POOL_SIZE_MB;
+ static int cq_vector = -1;
diff --git a/sys-block/tgt/tgt-1.0.79.ebuild b/sys-block/tgt/tgt-1.0.79.ebuild
index d6261e6104c8..a014556fa53f 100644
--- a/sys-block/tgt/tgt-1.0.79.ebuild
+++ b/sys-block/tgt/tgt-1.0.79.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit flag-o-matic toolchain-funcs
+inherit toolchain-funcs
MY_TREE="b43dbc6"
@@ -15,30 +15,32 @@ SLOT="0"
KEYWORDS="amd64 arm64 ~ppc x86"
IUSE="fcoe fcp ibmvio infiniband rbd"
-CDEPEND="dev-perl/Config-General
+DEPEND="
+ app-text/docbook-xsl-stylesheets
dev-libs/libxslt
+ dev-perl/Config-General
rbd? ( sys-cluster/ceph )
infiniband? (
sys-fabric/libibverbs:=
sys-fabric/librdmacm:=
)"
-DEPEND="${CDEPEND}
- app-text/docbook-xsl-stylesheets"
RDEPEND="${DEPEND}
dev-libs/libaio
sys-apps/sg3_utils"
S=${WORKDIR}/fujita-tgt-${MY_TREE}
+PATCHES=( "${FILESDIR}"/${P}-fno-common.patch )
+
pkg_setup() {
tc-export CC
}
src_prepare() {
+ default
sed -i -e 's:\($(CC)\) $^:\1 $(LDFLAGS) $^:' usr/Makefile || die
# make sure xml docs are generated before trying to install them
sed -i -e "s@install: @& all @g" doc/Makefile || die
- eapply_user
}
src_compile() {