summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-03-25 11:42:53 -0700
committerKhem Raj <raj.khem@gmail.com>2024-03-25 12:50:39 -0700
commitf370d3be8ebe7a9e4a639edc2171f26028841791 (patch)
tree03f65f039d8c19256fb373ace182341dcd8db1e5
parente9221e89bcbfed0bf9f26adca88f8971142cf5ad (diff)
downloadmeta-openembedded-f370d3be8ebe7a9e4a639edc2171f26028841791.tar.gz
rdma-core: Fix build with musl >= 1.2.5
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-support/rdma-core/rdma-core/0001-include-libgen.h-for-basename.patch58
-rw-r--r--meta-networking/recipes-support/rdma-core/rdma-core_50.0.bb4
2 files changed, 61 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/rdma-core/rdma-core/0001-include-libgen.h-for-basename.patch b/meta-networking/recipes-support/rdma-core/rdma-core/0001-include-libgen.h-for-basename.patch
new file mode 100644
index 000000000..a093e4704
--- /dev/null
+++ b/meta-networking/recipes-support/rdma-core/rdma-core/0001-include-libgen.h-for-basename.patch
@@ -0,0 +1,58 @@
1From ae6adc4c748e67919fdf8ae1d44c619ee104c271 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 25 Mar 2024 11:37:41 -0700
4Subject: [PATCH] include libgen.h for basename
5
6basename prototype has been removed from string.h from latest musl [1]
7compilers e.g. clang-18 flags the absense of prototype as error. therefore
8include libgen.h for providing it.
9
10[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
11
12Upstream-Status: Submitted [https://github.com/linux-rdma/rdma-core/pull/1443]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 kernel-boot/rdma_rename.c | 1 +
16 librdmacm/examples/rping.c | 1 +
17 providers/mlx5/mlx5_vfio.c | 1 +
18 3 files changed, 3 insertions(+)
19
20diff --git a/kernel-boot/rdma_rename.c b/kernel-boot/rdma_rename.c
21index 4af9e4a39..5193ac411 100644
22--- a/kernel-boot/rdma_rename.c
23+++ b/kernel-boot/rdma_rename.c
24@@ -2,6 +2,7 @@
25 /* Copyright (c) 2019, Mellanox Technologies. All rights reserved. See COPYING file */
26
27 #define _GNU_SOURCE
28+#include <libgen.h>
29 #include <stdio.h>
30 #include <stdlib.h>
31 #include <string.h>
32diff --git a/librdmacm/examples/rping.c b/librdmacm/examples/rping.c
33index cc16ad910..0f1321458 100644
34--- a/librdmacm/examples/rping.c
35+++ b/librdmacm/examples/rping.c
36@@ -33,6 +33,7 @@
37 #define _GNU_SOURCE
38 #include <endian.h>
39 #include <getopt.h>
40+#include <libgen.h>
41 #include <stdlib.h>
42 #include <string.h>
43 #include <stdio.h>
44diff --git a/providers/mlx5/mlx5_vfio.c b/providers/mlx5/mlx5_vfio.c
45index cd0c41462..4d064b1fc 100644
46--- a/providers/mlx5/mlx5_vfio.c
47+++ b/providers/mlx5/mlx5_vfio.c
48@@ -6,6 +6,7 @@
49 #define _GNU_SOURCE
50 #include <config.h>
51
52+#include <libgen.h>
53 #include <stdio.h>
54 #include <stdlib.h>
55 #include <unistd.h>
56--
572.44.0
58
diff --git a/meta-networking/recipes-support/rdma-core/rdma-core_50.0.bb b/meta-networking/recipes-support/rdma-core/rdma-core_50.0.bb
index d0f4fd47a..ab4de22a5 100644
--- a/meta-networking/recipes-support/rdma-core/rdma-core_50.0.bb
+++ b/meta-networking/recipes-support/rdma-core/rdma-core_50.0.bb
@@ -6,7 +6,9 @@ DEPENDS = "libnl"
6RDEPENDS:${PN} = "bash perl" 6RDEPENDS:${PN} = "bash perl"
7 7
8SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=master;protocol=https \ 8SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=master;protocol=https \
9 file://0001-cmake-Allow-SYSTEMCTL_BIN-to-be-overridden-from-envi.patch" 9 file://0001-cmake-Allow-SYSTEMCTL_BIN-to-be-overridden-from-envi.patch \
10 file://0001-include-libgen.h-for-basename.patch \
11"
10SRCREV = "bc6b4bc134532e952fe7f8efc251e1f89b912098" 12SRCREV = "bc6b4bc134532e952fe7f8efc251e1f89b912098"
11S = "${WORKDIR}/git" 13S = "${WORKDIR}/git"
12 14