summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Tintel <stijn@linux-ipv6.be>2023-11-03 03:09:30 +0200
committerSam James <sam@gentoo.org>2023-12-22 08:46:19 +0000
commita4679a1282ec6986ce6f603bc81ab25c29ce7d49 (patch)
treef4d7306a3bab2cc2e7c0e2b96e13df02a77ebed3 /sys-block
parentkde-apps/kio-extras-kf5: Set missing KDE_ORG_TAR_PN=kio-extras-kf5 (diff)
downloadgentoo-a4679a1282ec6986ce6f603bc81ab25c29ce7d49.tar.gz
gentoo-a4679a1282ec6986ce6f603bc81ab25c29ce7d49.tar.bz2
gentoo-a4679a1282ec6986ce6f603bc81ab25c29ce7d49.zip
sys-block/open-iscsi: fix build against musl
Add an upstream patch that fixes build on musl. Closes: https://bugs.gentoo.org/908587 Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be> Closes: https://github.com/gentoo/gentoo/pull/33657 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-block')
-rw-r--r--sys-block/open-iscsi/files/open-iscsi-2.1.9-usr-idbm.c-fix-musl-build-426.patch40
-rw-r--r--sys-block/open-iscsi/open-iscsi-2.1.9.ebuild1
2 files changed, 41 insertions, 0 deletions
diff --git a/sys-block/open-iscsi/files/open-iscsi-2.1.9-usr-idbm.c-fix-musl-build-426.patch b/sys-block/open-iscsi/files/open-iscsi-2.1.9-usr-idbm.c-fix-musl-build-426.patch
new file mode 100644
index 000000000000..0c4a2aa13ab7
--- /dev/null
+++ b/sys-block/open-iscsi/files/open-iscsi-2.1.9-usr-idbm.c-fix-musl-build-426.patch
@@ -0,0 +1,40 @@
+From 11bdc17938ba648c81a853355a6bbddad69a9fc7 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Wed, 4 Oct 2023 23:18:20 +0200
+Subject: [PATCH] usr/idbm.c: fix musl build (#426)
+
+Fix the following musl build failure raised since version 2.1.9 and
+https://github.com/open-iscsi/open-iscsi/commit/7b571d76d6937a78c141630fc38c3c57c532466c:
+
+../usr/idbm.c: In function 'idbm_rec_write_old':
+../usr/idbm.c:2230:27: error: 'GLOB_ONLYDIR' undeclared (first use in this function)
+ 2230 | rc = glob(portal, GLOB_ONLYDIR, NULL, &globbuf);
+ | ^~~~~~~~~~~~
+
+Fixes:
+ - http://autobuild.buildroot.org/results/14fc1c139f055b5b1eaa6e04e327863c06176a7b
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ usr/idbm.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/usr/idbm.c b/usr/idbm.c
+index ca4a4ec..c39abb6 100644
+--- a/usr/idbm.c
++++ b/usr/idbm.c
+@@ -45,6 +45,11 @@
+ #include "fw_context.h"
+ #include "iscsi_err.h"
+
++// GLOB_ONLYDIR is not defined under musl
++#ifndef GLOB_ONLYDIR
++#define GLOB_ONLYDIR 0x100
++#endif
++
+ #define IDBM_HIDE 0 /* Hide parameter when print. */
+ #define IDBM_SHOW 1 /* Show parameter when print. */
+ #define IDBM_MASKED 2 /* Show "stars" instead of real value when print */
+--
+2.41.0
+
diff --git a/sys-block/open-iscsi/open-iscsi-2.1.9.ebuild b/sys-block/open-iscsi/open-iscsi-2.1.9.ebuild
index a64f3cc0f0b1..d5126eaad442 100644
--- a/sys-block/open-iscsi/open-iscsi-2.1.9.ebuild
+++ b/sys-block/open-iscsi/open-iscsi-2.1.9.ebuild
@@ -34,6 +34,7 @@ BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}"/${PN}-2.1.7-fix_bitwise.patch
+ "${FILESDIR}"/${P}-usr-idbm.c-fix-musl-build-426.patch
)
pkg_setup() {