aboutsummaryrefslogtreecommitdiff
path: root/src/common/sysdefs.h
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2020-02-22 14:15:07 +0200
committerLasse Collin <lasse.collin@tukaani.org>2020-03-11 12:05:57 +0200
commitac35c9585fb734b7a19785d490c152e0b8cd4663 (patch)
tree58ccbd514c0fa5dae55a98bdbbd9f17bb0ff10c3 /src/common/sysdefs.h
parentliblzma: Add more uses of lzma_memcmplen() to the normal mode of LZMA. (diff)
downloadxz-ac35c9585fb734b7a19785d490c152e0b8cd4663.tar.xz
Use defined(__GNUC__) before __GNUC__ in preprocessor lines.
This should silence the equivalent of -Wundef in compilers that don't define __GNUC__.
Diffstat (limited to '')
-rw-r--r--src/common/sysdefs.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/sysdefs.h b/src/common/sysdefs.h
index b6918179..df7ecf40 100644
--- a/src/common/sysdefs.h
+++ b/src/common/sysdefs.h
@@ -189,7 +189,8 @@ typedef unsigned char _Bool;
# define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
#endif
-#if (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4
+#if defined(__GNUC__) \
+ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 3) || __GNUC__ > 4)
# define lzma_attr_alloc_size(x) __attribute__((__alloc_size__(x)))
#else
# define lzma_attr_alloc_size(x)