commit:     e547354a2545379b5cdacbd8118c866ca768559c
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Fri Jan  1 18:04:24 2021 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Fri Jan  1 18:04:24 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e547354a

sys-block/tgt: Fix build with gcc-10

Closes: https://bugs.gentoo.org/709638
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 sys-block/tgt/files/tgt-1.0.79-fno-common.patch | 22 ++++++++++++++++++++++
 sys-block/tgt/tgt-1.0.79.ebuild                 | 12 +++++++-----
 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 00000000000..08933df021d
--- /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 d6261e6104c..a014556fa53 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() {

Reply via email to