also Tested-By
since its working ok in yocto CI as well.
closing in favor of !888 (merged)
musl does not provide GNU basename like string.h on glibc based systems does, it does provide the POSIX compliant basename function therefore allow to include libgen.h on non-glibc based linux systems
Signed-off-by: Khem Raj raj.khem@gmail.com
yes the patch in MR #888 fixes the issue and is better.
This patch looks better than mine,
Reviewed-by: Khem Raj <raj.khem@gmail.com>
this will happen with 1.2.5 release onward, I am not sure if alpine has upgraded to move
musl does not provide GNU basename like string.h on glibc based systems does, it does provide the POSIX compliant basename function therefore allow to include libgen.h on non-glibc based linux systems
Signed-off-by: Khem Raj raj.khem@gmail.com
Khem Raj (232a67b6) at 13 Feb 16:56
utils: Include libgen.h on musl/linux systems
... and 81 more commits
Khem Raj (dbd134ca) at 18 Dec 21:33
Khem Raj (c174995b) at 15 Dec 23:26
libweston,tools: Include libgen.h for basename signature
yes, I have tried to fix it with basename
operating on copy of string.
Khem Raj (50a44ee6) at 15 Dec 19:53
libweston,tools: Include libgen.h for basename signature
Latest musl has removed the declaration from string.h [1] as it only implements POSIX version alone and string.h in glibc implements GNU version of basename. This now results in compile errors on musl.
This might be a warning with older compilers but it is error with Clang-17+ as it treats -Wimplicit-function-declaration as error
[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
Signed-off-by: Khem Raj raj.khem@gmail.com
Khem Raj (2b53236a) at 14 Dec 17:19
libweston,tools: Include libgen.h for basename signature
Khem Raj (601cdf04) at 29 Nov 20:03
This is seen when compiling with CC="clang -D_FORTIFY_SOURCE=2" Move #ifdef outside of printf() call.
Fixes
| ../git/vtest/vtest_server.c:244:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
| 244 | #ifdef ENABLE_VENUS
| | ^
| ../git/vtest/vtest_server.c:246:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
| 246 | #endif
| | ^
Signed-off-by: Khem Raj raj.khem@gmail.com
Khem Raj (ea328b24) at 29 Nov 06:07
vtest: Fix undefined behavior with clang