diff options
author | Khem Raj <raj.khem@gmail.com> | 2023-12-10 12:25:48 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-12-13 11:34:27 +0000 |
commit | ad645dc8b2734cca246eed306873412a464dadff (patch) | |
tree | d7972de9a7a3a315c08c259dc0f6771944de1ac8 /meta/recipes-core/sysvinit/sysvinit | |
parent | 86a377ebe788d7fa202b4b041d575ed4a0e0589e (diff) | |
download | poky-ad645dc8b2734cca246eed306873412a464dadff.tar.gz |
sysvinit: Include libgen.h for basename API
This fixes build with latest musl which drops basename declaration API from string.h
(From OE-Core rev: 63732c7accf802aab106a85d7d3852a689d9beaf)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/sysvinit/sysvinit')
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit/0001-hddown-include-libgen.h-for-basename-API.patch | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit/0001-hddown-include-libgen.h-for-basename-API.patch b/meta/recipes-core/sysvinit/sysvinit/0001-hddown-include-libgen.h-for-basename-API.patch new file mode 100644 index 0000000000..5e4053bad1 --- /dev/null +++ b/meta/recipes-core/sysvinit/sysvinit/0001-hddown-include-libgen.h-for-basename-API.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From a07c1d94e79840c59563741b45e690e77d4f3dfa Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 3 Dec 2023 20:09:30 -0800 | ||
4 | Subject: [PATCH] hddown: include libgen.h for basename API | ||
5 | |||
6 | musl has removed the non-prototype declaration of basename from string.h [1] which now results in build errors with clang-17+ compiler | ||
7 | |||
8 | include libgen.h for using the posix declaration of the funciton. | ||
9 | |||
10 | Fixes | ||
11 | |||
12 | hddown.c:135:8: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Wint-conversion] | ||
13 | 135 | ptr = basename(lnk); | ||
14 | | ^ ~~~~~~~~~~~~~ | ||
15 | |||
16 | [1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7 | ||
17 | |||
18 | Upstream-Status: Submitted [https://github.com/slicer69/sysvinit/pull/21] | ||
19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
20 | --- | ||
21 | src/hddown.c | 1 + | ||
22 | 1 file changed, 1 insertion(+) | ||
23 | |||
24 | diff --git a/src/hddown.c b/src/hddown.c | ||
25 | index 7a2cf28..3b31bc0 100644 | ||
26 | --- a/src/hddown.c | ||
27 | +++ b/src/hddown.c | ||
28 | @@ -24,6 +24,7 @@ char *v_hddown = "@(#)hddown.c 1.02 22-Apr-2003 miquels@cistron.nl"; | ||
29 | #ifndef _GNU_SOURCE | ||
30 | #define _GNU_SOURCE | ||
31 | #endif | ||
32 | +#include <libgen.h> | ||
33 | #include <stdio.h> | ||
34 | #include <stdlib.h> | ||
35 | #include <unistd.h> | ||
36 | -- | ||
37 | 2.43.0 | ||
38 | |||