From f370d3be8ebe7a9e4a639edc2171f26028841791 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 25 Mar 2024 11:42:53 -0700 Subject: rdma-core: Fix build with musl >= 1.2.5 Signed-off-by: Khem Raj --- .../0001-include-libgen.h-for-basename.patch | 58 ++++++++++++++++++++++ .../recipes-support/rdma-core/rdma-core_50.0.bb | 4 +- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-support/rdma-core/rdma-core/0001-include-libgen.h-for-basename.patch 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 @@ +From ae6adc4c748e67919fdf8ae1d44c619ee104c271 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 25 Mar 2024 11:37:41 -0700 +Subject: [PATCH] include libgen.h for basename + +basename prototype has been removed from string.h from latest musl [1] +compilers e.g. clang-18 flags the absense of prototype as error. therefore +include libgen.h for providing it. + +[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 + +Upstream-Status: Submitted [https://github.com/linux-rdma/rdma-core/pull/1443] +Signed-off-by: Khem Raj +--- + kernel-boot/rdma_rename.c | 1 + + librdmacm/examples/rping.c | 1 + + providers/mlx5/mlx5_vfio.c | 1 + + 3 files changed, 3 insertions(+) + +diff --git a/kernel-boot/rdma_rename.c b/kernel-boot/rdma_rename.c +index 4af9e4a39..5193ac411 100644 +--- a/kernel-boot/rdma_rename.c ++++ b/kernel-boot/rdma_rename.c +@@ -2,6 +2,7 @@ + /* Copyright (c) 2019, Mellanox Technologies. All rights reserved. See COPYING file */ + + #define _GNU_SOURCE ++#include + #include + #include + #include +diff --git a/librdmacm/examples/rping.c b/librdmacm/examples/rping.c +index cc16ad910..0f1321458 100644 +--- a/librdmacm/examples/rping.c ++++ b/librdmacm/examples/rping.c +@@ -33,6 +33,7 @@ + #define _GNU_SOURCE + #include + #include ++#include + #include + #include + #include +diff --git a/providers/mlx5/mlx5_vfio.c b/providers/mlx5/mlx5_vfio.c +index cd0c41462..4d064b1fc 100644 +--- a/providers/mlx5/mlx5_vfio.c ++++ b/providers/mlx5/mlx5_vfio.c +@@ -6,6 +6,7 @@ + #define _GNU_SOURCE + #include + ++#include + #include + #include + #include +-- +2.44.0 + 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" RDEPENDS:${PN} = "bash perl" SRC_URI = "git://github.com/linux-rdma/rdma-core.git;branch=master;protocol=https \ - file://0001-cmake-Allow-SYSTEMCTL_BIN-to-be-overridden-from-envi.patch" + file://0001-cmake-Allow-SYSTEMCTL_BIN-to-be-overridden-from-envi.patch \ + file://0001-include-libgen.h-for-basename.patch \ +" SRCREV = "bc6b4bc134532e952fe7f8efc251e1f89b912098" S = "${WORKDIR}/git" -- cgit v1.2.3-54-g00ecf