[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-devel
Subject: [oe] [meta-networking][PATCH 19/21] rdma-core: Fix build with musl
From: "Khem Raj" <raj.khem () gmail ! com>
Date: 2022-08-30 7:14:11
Message-ID: 20220830071413.3887189-19-raj.khem () gmail ! com
[Download RAW message or body]
Content-Transfer-Encoding: 8bit
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...xamples-Include-alloca.h-for-strdupa.patch | 29 +++++++++++++++++++
.../rdma-core/rdma-core_42.0.bb | 4 ++-
2 files changed, 32 insertions(+), 1 deletion(-)
create mode 100644 meta-networking/recipes-support/rdma-core/rdma-core/0001-examples-Include-alloca.h-for-strdupa.patch
diff --git a/meta-networking/recipes-support/rdma-core/rdma-core/0001-examples-Include-alloca.h-for-strdupa.patch \
b/meta-networking/recipes-support/rdma-core/rdma-core/0001-examples-Include-alloca.h-for-strdupa.patch
new file mode 100644
index 0000000000..cb472d9db9
--- /dev/null
+++ b/meta-networking/recipes-support/rdma-core/rdma-core/0001-examples-Include-alloca.h-for-strdupa.patch
@@ -0,0 +1,29 @@
+From a6c547e46bbadd2c08be9944a85308f6625263cb Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 29 Aug 2022 23:15:44 -0700
+Subject: [PATCH] examples: Include alloca.h for strdupa
+
+musl defines strdupa via a macro which uses alloca() therefore include
+the header to get the prototype
+
+Upstream-Status: Submitted [https://github.com/linux-rdma/rdma-core/pull/1212]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libibverbs/examples/asyncwatch.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/libibverbs/examples/asyncwatch.c b/libibverbs/examples/asyncwatch.c
+index 724796e58..842b94180 100644
+--- a/libibverbs/examples/asyncwatch.c
++++ b/libibverbs/examples/asyncwatch.c
+@@ -36,6 +36,7 @@
+ #include <endian.h>
+ #include <getopt.h>
+ #include <string.h>
++#include <alloca.h>
+
+ #include <util/compiler.h>
+ #include <infiniband/verbs.h>
+--
+2.37.2
+
diff --git a/meta-networking/recipes-support/rdma-core/rdma-core_42.0.bb \
b/meta-networking/recipes-support/rdma-core/rdma-core_42.0.bb index \
e1123dcc14..86243a52c5 100644
--- a/meta-networking/recipes-support/rdma-core/rdma-core_42.0.bb
+++ b/meta-networking/recipes-support/rdma-core/rdma-core_42.0.bb
@@ -5,7 +5,9 @@ SECTION = "libs"
DEPENDS = "libnl"
RDEPENDS:${PN} = "bash perl"
-SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=master;protocol=https"
+SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=master;protocol=https \
+ file://0001-examples-Include-alloca.h-for-strdupa.patch \
+ "
SRCREV = "196bad56ed060612e22674b668b5ec3d8659ade3"
S = "${WORKDIR}/git"
--
2.37.2
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#98556): https://lists.openembedded.org/g/openembedded-devel/message/98556
Mute This Topic: https://lists.openembedded.org/mt/93344309/4455120
Group Owner: openembedded-devel+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [openembedded-devel@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic