mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-03-06 05:51:44 +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 [Fortify source already defined.])])
|
||||||
dnl AX_CHECK_COMPILE_FLAG[-D_FORTIFY_SOURCE=2],[AC_DEFINE([FORTIFY_SOURCE_ENABLED], [1],
|
dnl AX_CHECK_COMPILE_FLAG[-D_FORTIFY_SOURCE=2],[AC_DEFINE([FORTIFY_SOURCE_ENABLED], [1],
|
||||||
dnl [Fortify source already defined.])])
|
dnl [Fortify source already defined.])])
|
||||||
AC_EGREP_CPP(dont_have_fortify_source, [
|
AC_TRY_RUN([
|
||||||
#ifdef _FORTIFY_SOURCE
|
#ifdef __cplusplus
|
||||||
yes_have_fortify_source
|
extern "C"
|
||||||
#else
|
|
||||||
dont_have_fortify_source
|
|
||||||
#endif
|
#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_CHECKING([if _FORTIFY_SOURCE automatically declared])
|
||||||
AC_MSG_RESULT([Adding -D_FORTIFY_SOURCE=2 to CFLAGS])
|
AC_MSG_RESULT([Adding -D_FORTIFY_SOURCE=2 to CFLAGS])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user