mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-09 17:03:35 -09:00
package/rpm: fix build issue with musl
Since the bump of rpm from 4.17.0 to 4.18.0 in Buildroot commit4b4046e919, tools/rpmuncompress.c uses basename() without including <libgen.h> which causes a build failure with the musl C library: tools/rpmuncompress.c: In function ‘doUntar’: tools/rpmuncompress.c:100:30: error: implicit declaration of function ‘basename’ [-Wimplicit-function-declaration] 100 | const char *bn = basename(fn); | ^~~~~~~~ tools/rpmuncompress.c:100:30: error: initialization of ‘const char *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] make[4]: *** [Makefile:1082: tools/rpmuncompress.o] Error 1 This issue was not found by the autobuilders, but it can be reproduced with: BR2_arm=y BR2_cortex_a9=y BR2_ARM_ENABLE_VFP=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV7_EABIHF_MUSL_BLEEDING_EDGE=y BR2_PACKAGE_LUA=y BR2_PACKAGE_RPM=y Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit745aa4d060) Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
committed by
Thomas Perale
parent
2d0c186d82
commit
1a8ed4da70
26
package/rpm/0003-Fix-missing-basename-include-on-macOS.patch
Normal file
26
package/rpm/0003-Fix-missing-basename-include-on-macOS.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
From f510770a214bd2e8144a39868c34cd568179599e Mon Sep 17 00:00:00 2001
|
||||
From: Calvin Buckley <calvin@cmpct.info>
|
||||
Date: Tue, 11 Jul 2023 19:22:41 -0300
|
||||
Subject: [PATCH] Fix missing basename include on macOS
|
||||
|
||||
Upstream: b2e67642fd8cb64d8cb1cca9e759396c1c10807d
|
||||
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
||||
---
|
||||
tools/rpmuncompress.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/tools/rpmuncompress.c b/tools/rpmuncompress.c
|
||||
index bd4146d54..58ddf5683 100644
|
||||
--- a/tools/rpmuncompress.c
|
||||
+++ b/tools/rpmuncompress.c
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "system.h"
|
||||
|
||||
#include <popt.h>
|
||||
+#include <libgen.h>
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
--
|
||||
2.49.0
|
||||
|
||||
Reference in New Issue
Block a user