summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTim Rühsen <tim.ruehsen@gmx.de>2019-05-17 14:59:08 +0000
committerTim Rühsen <tim.ruehsen@gmx.de>2019-05-17 14:59:08 +0000
commit3668ce5363b1300bb8ab25892c7e1d321596e560 (patch)
tree401b1aad558831d87b83889ca4dbc27a69eaef23 /lib
parent67f7df0926dfcb0d5cbcec08aafd3381165ab57c (diff)
parentbbc196e47d29b277560dea0e45aa01b352521de2 (diff)
downloadgnutls-3668ce5363b1300bb8ab25892c7e1d321596e560.tar.gz
Merge branch 'tmp-fix-gcc4.4' into 'master'
Tmp fix gcc4.4 See merge request gnutls/gnutls!996
Diffstat (limited to 'lib')
-rw-r--r--lib/gthreads.h6
-rw-r--r--lib/tpm.c1
2 files changed, 4 insertions, 3 deletions
diff --git a/lib/gthreads.h b/lib/gthreads.h
index 02ab8d3da9..8a4e9e444a 100644
--- a/lib/gthreads.h
+++ b/lib/gthreads.h
@@ -25,9 +25,11 @@
#include <config.h>
-#ifdef HAVE_THREADS_H
+/* Using a C99-only compiler installed in parallel with modern C11 environment
+ * will see HAVE_THREADS_H, but won't be able to use _Thread_local. */
+#if __STDC_VERSION__ >= 201112 && !defined(__STDC_NO_THREADS__) && defined(HAVE_THREADS_H)
# include <threads.h>
-#elif defined(__GNUC__)
+#elif defined(__GNUC__) /* clang is also covered by __GNUC__ */
# define _Thread_local __thread
#elif defined(_MSC_VER)
# define _Thread_local __declspec(thread)
diff --git a/lib/tpm.c b/lib/tpm.c
index 781fc3387b..46b1ca970b 100644
--- a/lib/tpm.c
+++ b/lib/tpm.c
@@ -72,7 +72,6 @@ typedef TSS_RESULT (*Tspi_Context_LoadKeyByBlob_func)(TSS_HCONTEXT, TSS_HKEY, UI
typedef TSS_RESULT (*Tspi_Policy_AssignToObject_func)(TSS_HPOLICY, TSS_HOBJECT);
typedef TSS_RESULT (*Tspi_GetAttribData_func)(TSS_HOBJECT, TSS_FLAG, TSS_FLAG, UINT32*, BYTE**);
typedef TSS_RESULT (*Tspi_GetAttribUint32_func)(TSS_HOBJECT, TSS_FLAG, TSS_FLAG, UINT32*);
-typedef TSS_RESULT (*Tspi_Context_GetTpmObject_func)(TSS_HCONTEXT, TSS_HTPM*);
typedef TSS_RESULT (*Tspi_TPM_StirRandom_func)(TSS_HTPM, UINT32, BYTE*);
typedef TSS_RESULT (*Tspi_SetAttribUint32_func)(TSS_HOBJECT, TSS_FLAG, TSS_FLAG, UINT32);
typedef TSS_RESULT (*Tspi_EncodeDER_TssBlob_func)(UINT32, BYTE*, UINT32, UINT32*, BYTE*);