diff options
author | Tim Rühsen <tim.ruehsen@gmx.de> | 2019-06-02 12:42:16 +0200 |
---|---|---|
committer | Tim Rühsen <tim.ruehsen@gmx.de> | 2019-06-02 12:42:16 +0200 |
commit | cf1f2ab81ded096b194b5b54a7ee14102f59ee62 (patch) | |
tree | 278851722e6bc0ef5b731511d980cc248d536450 /lib/gnutls_int.h | |
parent | dd18f81ef28cda29b97ab8ad4499163764c97603 (diff) | |
download | gnutls-cf1f2ab81ded096b194b5b54a7ee14102f59ee62.tar.gz |
Fix warn_unused_result for clang < 4tmp-fix-travis
Signed-off-by: Tim Rühsen <tim.ruehsen@gmx.de>
Diffstat (limited to 'lib/gnutls_int.h')
-rw-r--r-- | lib/gnutls_int.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h index bb49885978..f5a6477852 100644 --- a/lib/gnutls_int.h +++ b/lib/gnutls_int.h @@ -59,6 +59,8 @@ typedef int ssize_t; #ifdef __clang_major # define _GNUTLS_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) +#else +# define _GNUTLS_CLANG_VERSION 0 #endif /* clang also defines __GNUC__. It promotes a GCC version of 4.2.1. */ @@ -82,7 +84,7 @@ typedef int ssize_t; # define G_GNUC_WGET_NONNULL(a) #endif -#if _GNUTLS_GCC_VERSION >= 30400 +#if _GNUTLS_GCC_VERSION >= 30400 && (_GNUTLS_CLANG_VERSION == 0 || _GNUTLS_CLANG_VERSION >= 40000) # define warn_unused_result __attribute__((warn_unused_result)) #else # define warn_unused_result |