From 54556f8a498b1e2ab742f1b7c7ca929edec5560e Mon Sep 17 00:00:00 2001 From: wchang kim Date: Wed, 5 Jun 2024 19:31:36 +0900 Subject: [PATCH] Fixed the build error for gcc-14 Change-Id: I75d3372bb5f0aa0774fd3d42facd87d831af6116 --- packaging/toybox.spec | 4 ++-- scripts/mkflags.c | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packaging/toybox.spec b/packaging/toybox.spec index f51a7c8..6db102d 100644 --- a/packaging/toybox.spec +++ b/packaging/toybox.spec @@ -88,13 +88,13 @@ cp %{SOURCE1001} . # create a minimum dynamic toybox (ELF) that consists of 'nslookup', 'ping', and 'dhcpd'. cp %{SOURCE1} .config export LDFLAGS=" -ldlog" -make -j 4 CC+="gcc $RPM_OPT_FLAGS" CFLAGS="$CFLAGS -fPIE -I/usr/include/dlog/ -Wno-nonnull" LDOPTIMIZE="-Wl,--gc-sections -pie" +make -j 4 CC+="gcc $RPM_OPT_FLAGS" CFLAGS="$CFLAGS -fPIE -I/usr/include/dlog/ -Wno-nonnull -Wno-incompatible-pointer-types" LDOPTIMIZE="-Wl,--gc-sections -pie" cp toybox toybox-dynamic # create a dynamic toybox-full (ELF) that include most of the applets including 'init'. cp %{SOURCE11} .config export LDFLAGS=" -ldlog" -make -j 4 CC+="gcc $RPM_OPT_FLAGS" CFLAGS="$CFLAGS -fPIE -I/usr/include/dlog/ -Wno-nonnull" LDOPTIMIZE="-Wl,--gc-sections -pie" +make -j 4 CC+="gcc $RPM_OPT_FLAGS" CFLAGS="$CFLAGS -fPIE -I/usr/include/dlog/ -Wno-nonnull -Wno-incompatible-pointer-types" LDOPTIMIZE="-Wl,--gc-sections -pie" cp toybox toybox-dynamic-full %install diff --git a/scripts/mkflags.c b/scripts/mkflags.c index d87087b..03f4b2e 100755 --- a/scripts/mkflags.c +++ b/scripts/mkflags.c @@ -10,6 +10,8 @@ #include #include #include +#include +#include struct flag { struct flag *next; -- 2.7.4