summaryrefslogtreecommitdiff
path: root/include/features.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/features.h')
-rw-r--r--include/features.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/features.h b/include/features.h
index 120a242166..fc1a5b5200 100644
--- a/include/features.h
+++ b/include/features.h
@@ -299,8 +299,13 @@
#endif
#if defined _FORTIFY_SOURCE && _FORTIFY_SOURCE > 0 \
- && __GNUC_PREREQ (4, 1) && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
-# if _FORTIFY_SOURCE > 1
+ && defined __OPTIMIZE__ && __OPTIMIZE__ > 0
+# if !__GNUC_PREREQ (4, 1)
+# ifdef __GNUC_RH_RELEASE__
+# warning _FORTIFY_SOURCE supported only with GCC 4.1 and later
+# endif
+# define __USE_FORTIFY_LEVEL 0
+# elif _FORTIFY_SOURCE > 1
# define __USE_FORTIFY_LEVEL 2
# else
# define __USE_FORTIFY_LEVEL 1