Commit 9dc7a22e authored by Janne Grunau's avatar Janne Grunau Committed by Rémi Denis-Courmont

build: avoid annoying _FORTIFY_SOURCE warnings (fixes #17341)

fixed patch with the duplicate "#if defined ..." removed

Some toolchains predefine _FORTIFY_SOURCE resulting in countless
_FORTIFY_SOURCE is redefined warnings. Using _FORTIFY_SOURCE without
compiler optimizations also generates warnings.
_FORTIFY_SOURCE is a reserved identifier in C99 ("All identifiers that
begin with an underscore and either an uppercase letter or another
underscore are always reserved for any use.") so the toolchain is
perfectly free to predefine it.
Signed-off-by: Rémi Denis-Courmont's avatarRémi Denis-Courmont <>
parent fb0734b6
......@@ -36,7 +36,12 @@ dnl
AC_DEFINE([_FORTIFY_SOURCE], 2, [Define to 2 to get glibc warnings.])
[/* Enable compile-time and run-time bounds-checking, and some warnings,
without upsetting glibc 2.15+ or toolchains predefining _FORTIFY_SOURCE */
#if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
# define _FORTIFY_SOURCE 2
AC_DEFINE([_FILE_OFFSET_BITS], 64, [Define to 64 for large files support.])
AC_DEFINE([__LIBVLC__],, [Define within the LibVLC source code tree.])
AC_DEFINE([WIN32_LEAN_AND_MEAN],, [Define to limit the scope of <windows.h>.])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment