Fixed the build error for gcc-14 61/312261/1 accepted/tizen_9.0_unified accepted/tizen_unified accepted/tizen_unified_dev accepted/tizen_unified_toolchain accepted/tizen_unified_x accepted/tizen_unified_x_asan tizen_9.0 accepted/tizen/9.0/unified/20241030.234147 accepted/tizen/unified/20240611.123452 accepted/tizen/unified/dev/20240620.011147 accepted/tizen/unified/toolchain/20240610.173100 accepted/tizen/unified/x/20240610.223630 accepted/tizen/unified/x/asan/20240625.092132 tizen_9.0_m2_release
authorwchang kim <wchang.kim@samsung.com>
Wed, 5 Jun 2024 10:31:36 +0000 (19:31 +0900)
committerwchang kim <wchang.kim@samsung.com>
Wed, 5 Jun 2024 10:31:36 +0000 (19:31 +0900)
Change-Id: I75d3372bb5f0aa0774fd3d42facd87d831af6116

packaging/toybox.spec
scripts/mkflags.c

index f51a7c8..6db102d 100644 (file)
@@ -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
index d87087b..03f4b2e 100755 (executable)
@@ -10,6 +10,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
+#include <ctype.h>
+#include <unistd.h>
 
 struct flag {
   struct flag *next;