summaryrefslogtreecommitdiffstats
path: root/src/H5private.h
diff options
context:
space:
mode:
authorDavid Young <dyoung@hdfgroup.org>2020-02-07 20:57:46 (GMT)
committerDavid Young <dyoung@hdfgroup.org>2020-02-07 20:57:46 (GMT)
commit39fd512fe7475590598541e494d4cef82c452ac8 (patch)
treedf2037f9a8b8e81ae3643e7ed76df5bb9e39eec2 /src/H5private.h
parent021740bac0893a87c762959b284283bc236d0ab3 (diff)
downloadhdf5-39fd512fe7475590598541e494d4cef82c452ac8.zip
hdf5-39fd512fe7475590598541e494d4cef82c452ac8.tar.gz
hdf5-39fd512fe7475590598541e494d4cef82c452ac8.tar.bz2
Make sure that H5TS_thread_id() is available as either a function or a macro in
all configurations. Previously it was neither declared nor defined in --disable-threadsafety builds. The compiler's warning got lost in the noise---I first saw the issue because my -Werror branch stopped compiling cold---and the tests still linked and ran.
Diffstat (limited to 'src/H5private.h')
-rw-r--r--src/H5private.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/H5private.h b/src/H5private.h
index f0f3687..2f5a727 100644
--- a/src/H5private.h
+++ b/src/H5private.h
@@ -1897,12 +1897,14 @@ H5_DLL double H5_trace(const double *calltime, const char *func, const char *typ
/* global library version information string */
extern char H5_lib_vers_info_g[];
+/* Include required thread-safety header, always, for the H5TS_thread_id()
+ * definition.
+ */
+#include "H5TSprivate.h"
+
/* Lock headers */
#ifdef H5_HAVE_THREADSAFE
-/* Include required thread-safety header */
-#include "H5TSprivate.h"
-
/* replacement structure for original global variable */
typedef struct H5_api_struct {
H5TS_mutex_t init_lock; /* API entrance mutex */