From 29c98faf72b235e8add44509eeabd9ccf9f49043 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20R=C3=BChsen?= Date: Wed, 3 Jan 2018 11:50:07 +0100 Subject: [PATCH] Fix -Wundef warning in user-included header lib/cdefs.h. * lib/cdefs.h: Check if defined before using __USE_FORTIFY_LEVEL. --- ChangeLog | 5 +++++ lib/cdefs.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f934336d55..3f2d8ce5b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-01-04 Tim Rühsen + + 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 pthread_sigmask: Avoid compilation error on mingw. diff --git a/lib/cdefs.h b/lib/cdefs.h index 9ed0259dce..f6c20fe2ed 100644 --- a/lib/cdefs.h +++ b/lib/cdefs.h @@ -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 -- 2.11.4.GIT