From b3035b36c631614e32707cce0ab04c72c79c49a7 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Tue, 5 Nov 2024 00:09:13 -0800 Subject: [PATCH] blind fix for QNX following notification from @rainbowball. fix #4186. Note: there is currently no QNX compilation test in CI so this is a "blind" fix, and this target can be silently broken again in the future. --- programs/util.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/programs/util.h b/programs/util.h index 571d39421..ec8139684 100644 --- a/programs/util.h +++ b/programs/util.h @@ -11,23 +11,18 @@ #ifndef UTIL_H_MODULE #define UTIL_H_MODULE -#if defined (__cplusplus) -extern "C" { -#endif - - /*-**************************************** * Dependencies ******************************************/ #include "platform.h" /* PLATFORM_POSIX_VERSION, ZSTD_NANOSLEEP_SUPPORT, ZSTD_SETPRIORITY_SUPPORT */ #include /* size_t, ptrdiff_t */ +#include /* FILE */ #include /* stat, utime */ #include /* stat, chmod */ #include "../lib/common/mem.h" /* U64 */ - /*-************************************************************ -* Avoid fseek()'s 2GiB barrier with MSVC, macOS, *BSD, MinGW +* Fix fseek()'s 2GiB barrier with MSVC, macOS, *BSD, MinGW ***************************************************************/ #if defined(_MSC_VER) && (_MSC_VER >= 1400) # define UTIL_fseek _fseeki64 @@ -39,7 +34,6 @@ extern "C" { # define UTIL_fseek fseek #endif - /*-************************************************* * Sleep & priority functions: Windows - Posix - others ***************************************************/ @@ -88,6 +82,10 @@ extern "C" { #endif +#if defined (__cplusplus) +extern "C" { +#endif + /*-**************************************** * Console log ******************************************/ -- 2.47.2