aboutsummaryrefslogtreecommitdiff
path: root/misc/sys
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2014-07-03 01:32:17 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2014-07-03 01:49:48 +0530
commitd12704c78f04eb6c666143953e81dec89e1cadea (patch)
treeb0844ee9d58b496fb8f00b04e9643c4474572ed9 /misc/sys
parent05fdac772bee5352a52f26682dd351712e92f9b3 (diff)
downloadglibc-d12704c78f04eb6c666143953e81dec89e1cadea.zip
glibc-d12704c78f04eb6c666143953e81dec89e1cadea.tar.gz
glibc-d12704c78f04eb6c666143953e81dec89e1cadea.tar.bz2
Fix Wundef warning for __STDC_VERSION__
c4c4124473c187b5c4642611390897666c3d3970 added the _Noreturn macro for pre-C11 compilers, but it now throws a new Wundef warning during `make check` for __STDC_VERSION__ which gcc does not define by default. The following patch fixes this in line with other uses of __STDC_VERSION__ in the file.
Diffstat (limited to 'misc/sys')
-rw-r--r--misc/sys/cdefs.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index a5c3224..04db956 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -382,7 +382,9 @@
# define __glibc_likely(cond) (cond)
#endif
-#if !defined _Noreturn && __STDC_VERSION__ < 201112 && !__GNUC_PREREQ (4,7)
+#if (!defined _Noreturn \
+ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
+ && !__GNUC_PREREQ (4,7))
# if __GNUC_PREREQ (2,8)
# define _Noreturn __attribute__ ((__noreturn__))
# else