Just my two cents...

On Wednesday, April 19, 2023, Raphaël Mélotte <raphael.melo...@mind.be>
wrote:
> +# Not all libc versions have getrandom, so check for it.
> +HAVE_GETRANDOM := $(shell printf '#include <stddef.h>\n#include
<sys/random.h>\nint main(void){char
buf[256];\ngetrandom(buf,sizeof(buf),GRND_NONBLOCK);}' >bb_libtest.c; $(CC)
$(CFLAGS) $(CFLAGS_busybox) -D_GNU_SOURCE -o /dev/null bb_libtest.c
>/dev/null 2>&1 && echo "y"; rm bb_libtest.c)

How about putting the define line '#define _GNU_SOURCE' into bb_libtest.c ?
I don't like defining the feature test macros externally in '-D' options.
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to