commit:     cfad54a2df42ae0950abdc46285926ec405bf54c
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 23 08:07:58 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 23 08:13:45 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cfad54a2

sys-fabric/libcxgb4: fix build on musl

Closes: https://bugs.gentoo.org/713776
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../libcxgb4/files/libcxgb4-1.3.2-use-system-queue.patch    | 12 ++++++++++++
 sys-fabric/libcxgb4/libcxgb4-1.3.2.ebuild                   | 13 ++++++++++---
 2 files changed, 22 insertions(+), 3 deletions(-)

diff --git a/sys-fabric/libcxgb4/files/libcxgb4-1.3.2-use-system-queue.patch 
b/sys-fabric/libcxgb4/files/libcxgb4-1.3.2-use-system-queue.patch
new file mode 100644
index 000000000000..3fa51a780d5d
--- /dev/null
+++ b/sys-fabric/libcxgb4/files/libcxgb4-1.3.2-use-system-queue.patch
@@ -0,0 +1,12 @@
+https://bugs.gentoo.org/713776
+--- a/src/libcxgb4.h
++++ b/src/libcxgb4.h
+@@ -41,7 +41,7 @@
+ #include <sys/time.h>
+ #include <infiniband/driver.h>
+ #include <infiniband/arch.h>
+-#include "queue.h"
++#include <sys/queue.h>
+ #include "t4.h"
+ 
+ extern unsigned long c4iw_page_size;

diff --git a/sys-fabric/libcxgb4/libcxgb4-1.3.2.ebuild 
b/sys-fabric/libcxgb4/libcxgb4-1.3.2.ebuild
index b4a7f4de7ad5..d0061e91f3d6 100644
--- a/sys-fabric/libcxgb4/libcxgb4-1.3.2.ebuild
+++ b/sys-fabric/libcxgb4/libcxgb4-1.3.2.ebuild
@@ -8,16 +8,23 @@ OFED_RC="1"
 OFED_RC_VER="1"
 OFED_SUFFIX="1"
 
-inherit openib
+inherit epatch openib
 
 DESCRIPTION="OpenIB - driver for Chelsio T4-based iWARP (RDMA over 
IP/ethernet)"
 KEYWORDS="amd64 x86 ~amd64-linux"
 IUSE=""
 
-DEPEND="sys-fabric/libibverbs:${SLOT}"
-RDEPEND="${DEPEND}"
+RDEPEND="sys-fabric/libibverbs:${SLOT}"
+DEPEND="${DEPEND}
+       elibc_musl? ( sys-libs/queue-standalone )"
 block_other_ofed_versions
 
+src_prepare() {
+       # bug #713776
+       epatch "${FILESDIR}"/${PN}-1.3.2-use-system-queue.patch
+       rm src/queue.h || die
+}
+
 src_configure() {
        econf --disable-static
 }

Reply via email to