From f4dd7a7226d4c3edba4ebaeb472b8fd62f570b75 Mon Sep 17 00:00:00 2001 From: Uwe Schulzweida <uwe.schulzweida@mpimet.mpg.de> Date: Tue, 29 Oct 2024 13:34:54 +0100 Subject: [PATCH] streamOpenID: changed Error to Warning --- src/stream.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/stream.c b/src/stream.c index 7264d3535..8da402e54 100644 --- a/src/stream.c +++ b/src/stream.c @@ -671,11 +671,17 @@ streamOpenID(const char *filename, char filemode, int filetype, int resH) #ifndef HAVE_NC4HDF5_THREADSAFE if (CDI_Threadsafe) { -#ifndef HAVE_LIBPTHREAD - Error("CDI threadsafe failed, pthread support not compiled in!"); -#endif +#ifdef HAVE_LIBPTHREAD if (filetype == CDI_FILETYPE_NC4 || filetype == CDI_FILETYPE_NC4C || filetype == CDI_FILETYPE_NCZARR) streamptr->lockIO = true; +#else + static bool lwarn = true; + if (lwarn) + { + lwarn = false; + Warning("CDI threadsafe failed, pthread support not compiled in!"); + } +#endif } #endif -- GitLab