mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-03-05 21:51:35 +00:00
detect _FORTIFY_SOURCE on openwrt
This commit is contained in:
parent
00c8f0fc65
commit
33a82bb012
17
configure.ac
17
configure.ac
@ -18,12 +18,19 @@ dnl AX_CHECK_COMPILE_FLAG[-D_FORTIFY_SOURCE=1],[AC_DEFINE([FORTIFY_SOURCE_ENABLE
|
||||
dnl [Fortify source already defined.])])
|
||||
dnl AX_CHECK_COMPILE_FLAG[-D_FORTIFY_SOURCE=2],[AC_DEFINE([FORTIFY_SOURCE_ENABLED], [1],
|
||||
dnl [Fortify source already defined.])])
|
||||
AC_EGREP_CPP(dont_have_fortify_source, [
|
||||
#ifdef _FORTIFY_SOURCE
|
||||
yes_have_fortify_source
|
||||
#else
|
||||
dont_have_fortify_source
|
||||
AC_TRY_RUN([
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
#ifndef _FORTIFY_SOURCE
|
||||
return 0;
|
||||
#else
|
||||
return 1;
|
||||
#endif
|
||||
}
|
||||
], [
|
||||
AC_MSG_CHECKING([if _FORTIFY_SOURCE automatically declared])
|
||||
AC_MSG_RESULT([Adding -D_FORTIFY_SOURCE=2 to CFLAGS])
|
||||
|
Loading…
x
Reference in New Issue
Block a user