diff options
author | Khem Raj <raj.khem@gmail.com> | 2024-03-25 11:42:53 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-03-25 12:50:39 -0700 |
commit | f370d3be8ebe7a9e4a639edc2171f26028841791 (patch) | |
tree | 03f65f039d8c19256fb373ace182341dcd8db1e5 /meta-networking | |
parent | e9221e89bcbfed0bf9f26adca88f8971142cf5ad (diff) | |
download | meta-openembedded-contrib-f370d3be8ebe7a9e4a639edc2171f26028841791.tar.gz |
rdma-core: Fix build with musl >= 1.2.5
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking')
-rw-r--r-- | meta-networking/recipes-support/rdma-core/rdma-core/0001-include-libgen.h-for-basename.patch | 58 | ||||
-rw-r--r-- | meta-networking/recipes-support/rdma-core/rdma-core_50.0.bb | 4 |
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 0000000000..a093e47048 --- /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 <raj.khem@gmail.com> +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 <raj.khem@gmail.com> +--- + 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 <libgen.h> + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +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 <endian.h> + #include <getopt.h> ++#include <libgen.h> + #include <stdlib.h> + #include <string.h> + #include <stdio.h> +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 <config.h> + ++#include <libgen.h> + #include <stdio.h> + #include <stdlib.h> + #include <unistd.h> +-- +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 d0f4fd47a5..ab4de22a51 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" |