changeset 39208:7bfe1e1d4698

Fix -Wundef warning in user-included header lib/cdefs.h. * lib/cdefs.h: Check if defined before using __USE_FORTIFY_LEVEL.
author Tim Rühsen <tim.ruehsen@gmx.de>
date Wed, 03 Jan 2018 11:50:07 +0100
parents ca2c3817b8a6
children d55b9d6af1df
files ChangeLog lib/cdefs.h
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Jan 04 10:42:21 2018 +0100
+++ b/ChangeLog	Wed Jan 03 11:50:07 2018 +0100
@@ -1,3 +1,8 @@
+2018-01-04  Tim Rühsen  <tim.ruehsen@gmx.de>
+
+	Fix -Wundef warning in user-included header lib/cdefs.h.
+	* lib/cdefs.h: Check if defined before using __USE_FORTIFY_LEVEL.
+
 2018-01-04  Bruno Haible  <bruno@clisp.org>
 
 	pthread_sigmask: Avoid compilation error on mingw.
--- a/lib/cdefs.h	Thu Jan 04 10:42:21 2018 +0100
+++ b/lib/cdefs.h	Wed Jan 03 11:50:07 2018 +0100
@@ -295,7 +295,7 @@
 #if __GNUC_PREREQ (3,4)
 # define __attribute_warn_unused_result__ \
    __attribute__ ((__warn_unused_result__))
-# if __USE_FORTIFY_LEVEL > 0
+# if defined __USE_FORTIFY_LEVEL && __USE_FORTIFY_LEVEL > 0
 #  define __wur __attribute_warn_unused_result__
 # endif
 #else