summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/multipath-tools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-03-26 19:01:26 -0700
committerKhem Raj <raj.khem@gmail.com>2024-03-27 07:57:29 -0700
commit85e9c3548e7acc8bf23831c0d163ebed26075d5b (patch)
treec145ef9b6333e91c1d612479088dc83af8b1b89c /meta-oe/recipes-support/multipath-tools
parent79fb44fa43a22e96fc53dec377bfe7ccd67bf7a7 (diff)
downloadmeta-openembedded-85e9c3548e7acc8bf23831c0d163ebed26075d5b.tar.gz
multipath-tools: Fix build with musl >= 1.2.5
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/multipath-tools')
-rw-r--r--meta-oe/recipes-support/multipath-tools/files/0001-libmultipath-always-use-glibc-basename.patch42
-rw-r--r--meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.8.bb1
2 files changed, 43 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/multipath-tools/files/0001-libmultipath-always-use-glibc-basename.patch b/meta-oe/recipes-support/multipath-tools/files/0001-libmultipath-always-use-glibc-basename.patch
new file mode 100644
index 000000000..0365a7ef6
--- /dev/null
+++ b/meta-oe/recipes-support/multipath-tools/files/0001-libmultipath-always-use-glibc-basename.patch
@@ -0,0 +1,42 @@
1From 389286b25a903be62ce7f964246824fcc20c4c67 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 26 Mar 2024 18:56:55 -0700
4Subject: [PATCH] libmultipath: always use glibc basename()
5
6There is a use of basename() which expects it to be GNU version of
7basename, which is not available in other libcs e.g. musl on Linux
8therefore provide a version for such cases
9
10Upstream-Status: Submitted [https://github.com/opensvc/multipath-tools/pull/84]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12---
13 libmultipath/configure.c | 13 +++++++++++++
14 1 file changed, 13 insertions(+)
15
16diff --git a/libmultipath/configure.c b/libmultipath/configure.c
17index 4ecf6ba4..e81cc67c 100644
18--- a/libmultipath/configure.c
19+++ b/libmultipath/configure.c
20@@ -43,6 +43,19 @@
21 #include "sysfs.h"
22 #include "io_err_stat.h"
23
24+#ifndef __GLIBC__
25+/*
26+ * glibc's non-destructive version of basename()
27+ * License: LGPL-2.1-or-later
28+ */
29+static const char *__basename(const char *filename)
30+{
31+ char *p = strrchr(filename, '/');
32+ return p ? p + 1 : filename;
33+}
34+#define basename(x) __basename(x)
35+#endif
36+
37 /* group paths in pg by host adapter
38 */
39 int group_by_host_adapter(struct pathgroup *pgp, vector adapters)
40--
412.44.0
42
diff --git a/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.8.bb b/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.8.bb
index df95df6f7..e9f01bd1f 100644
--- a/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.8.bb
+++ b/meta-oe/recipes-support/multipath-tools/multipath-tools_0.9.8.bb
@@ -44,6 +44,7 @@ SRC_URI = "git://github.com/opensvc/multipath-tools.git;protocol=https;branch=ma
44 file://0010-Subject-PATCH-Always-use-devmapper.patch \ 44 file://0010-Subject-PATCH-Always-use-devmapper.patch \
45 file://0011-fix-bug-of-do_compile-and-do_install.patch \ 45 file://0011-fix-bug-of-do_compile-and-do_install.patch \
46 file://0012-add-explicit-dependency-on-libraries.patch \ 46 file://0012-add-explicit-dependency-on-libraries.patch \
47 file://0001-libmultipath-always-use-glibc-basename.patch \
47 " 48 "
48 49
49LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" 50LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"