1
0
mirror of https://github.com/termux/termux-packages synced 2024-06-18 16:27:08 +00:00

radare2: Fix configure for strict C99

%ci:no-build
This commit is contained in:
Tee KOBAYASHI 2023-04-07 07:28:07 +09:00 committed by xtkoba
parent fb89f7ff85
commit b49e0cd53f
2 changed files with 47 additions and 1 deletions

View File

@ -6,7 +6,6 @@ TERMUX_PKG_VERSION="5.8.4"
TERMUX_PKG_SRCURL=https://github.com/radare/radare2/archive/$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=8ea45bd82e5ea37e270ca14ac2a6f947c647a24f9de9e18bf8cebc71c0816dcd
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_ENABLE_CLANG16_PORTING=false
TERMUX_PKG_DEPENDS="libuv"
TERMUX_PKG_BREAKS="radare2-dev"
TERMUX_PKG_REPLACES="radare2-dev"

View File

@ -0,0 +1,47 @@
https://github.com/termux/termux-packages/issues/15852
--- a/configure
+++ b/configure
@@ -688,7 +688,7 @@
LIBXXHASH=""; fi
printf "checking declaration of ADDR_NO_RANDOMIZE in sys/personality.h... "
echo "#include <sys/personality.h>" > test.c
-echo "int main(int ac, char **av){ void *a = ADDR_NO_RANDOMIZE; return 0; }" >> test.c
+echo "int main(int ac, char **av){ void *a = (void *)ADDR_NO_RANDOMIZE; return 0; }" >> test.c
${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} test.c >/dev/null 2>&1
if [ $? = 0 ]; then
echo yes ; HAVE_DECL_ADDR_NO_RANDOMIZE=1
@@ -703,7 +703,7 @@
else
HAVE_DECL___GLIBC__=0 ; echo no ; fi
printf "checking function arc4random_uniform() in c... "
-echo "int main(int ac, char **av){ arc4random_uniform(0); return 0; }" > test.c
+echo "int arc4random_uniform(); int main(int ac, char **av){ arc4random_uniform(0); return 0; }" > test.c
${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -lc test.c >/dev/null 2>&1
if [ $? = 0 ]; then
echo yes ; HAVE_ARC4RANDOM_UNIFORM=1
@@ -724,21 +724,21 @@
else
HAVE_EXPLICIT_MEMSET=0 ; echo no ; fi
printf "checking function clock_nanosleep() in c... "
-echo "int main(int ac, char **av){ clock_nanosleep(0); return 0; }" > test.c
+echo "int clock_nanosleep(); int main(int ac, char **av){ clock_nanosleep(0); return 0; }" > test.c
${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -lc test.c >/dev/null 2>&1
if [ $? = 0 ]; then
echo yes ; HAVE_CLOCK_NANOSLEEP=1
else
HAVE_CLOCK_NANOSLEEP=0 ; echo no ; fi
printf "checking function sigaction() in c... "
-echo "int main(int ac, char **av){ sigaction(0); return 0; }" > test.c
+echo "int sigaction(); int main(int ac, char **av){ sigaction(0); return 0; }" > test.c
${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -lc test.c >/dev/null 2>&1
if [ $? = 0 ]; then
echo yes ; HAVE_SIGACTION=1
else
HAVE_SIGACTION=0 ; echo no ; fi
printf "checking function clock_gettime() in c... "
-echo "int main(int ac, char **av){ clock_gettime(0); return 0; }" > test.c
+echo "int clock_gettime(); int main(int ac, char **av){ clock_gettime(0); return 0; }" > test.c
${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -lc test.c >/dev/null 2>&1
if [ $? = 0 ]; then
echo yes ; HAVE_CLOCK_GETTIME=1