Files
termux-packages/packages/radare2/configure-clang16.patch
termux-pacman-bot cb55265b6e radare2: Fix configure for strict C99
%ci:no-build
2023-04-06 23:01:29 +00:00

48 lines
2.1 KiB
Diff

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