arp-scan icon indicating copy to clipboard operation
arp-scan copied to clipboard

Add -D_FORTIFY_SOURCE=3 to CFLAGS if supported

Open royhills opened this issue 6 months ago • 1 comments

Currently we check for -D_FORTIFY_SOURCE=2 support using GCC version checks. Update this to use -D_FORTIFY_SOURCE=3 if supported by the toolchain.

Don't use ax_add_fortify_source.m4 from the autoconf archive as originally planned because this macro leaves the setting unchanged if it has been configured in the compiler settings.

This change will add -D_FORTIFY_SOURCE=3 to CFLAGS if supported (recent GCC and Clang versions) and, failing that, add -D_FORTIFY_SOURCE=2 which will almost certainly be supported.

royhills avatar Aug 26 '24 23:08 royhills