https://github.com/LLNL/Silo/pull/371 From f0737787eb02093defc30de05a731ffe63c4c6f4 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 17 Mar 2024 07:35:36 +0000 Subject: [PATCH] tests: add missing header for `difftime` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With GCC 14, which makes implicit function declarations an error by default: ``` TestReadMask.c: In function ‘ElapsedTime’: TestReadMask.c:746:15: error: implicit declaration of function ‘difftime’ [-Wimplicit-function-declaration] 746 | ms = (int)difftime(end_time.tv_sec, start_time.tv_sec); | ^~~~~~~~ TestReadMask.c:62:1: note: ‘difftime’ is defined in header ‘’; this is probably fixable by adding ‘#include ’ 61 | #include +++ |+#include 62 | ``` Fix the include guards and include unconditionally (for difftime) and unconditionally too (for memcpy). Signed-off-by: Sam James --- a/tests/TestReadMask.c +++ b/tests/TestReadMask.c @@ -51,13 +51,12 @@ product endorsement purposes. */ #include #include +#include #ifndef WIN32 #include -#else -#include -#include #endif #include +#include #include /* To compile this program on hyper, here is the command: