From: Yann Collet Date: Tue, 5 Nov 2024 08:09:13 +0000 (-0800) Subject: blind fix for QNX X-Git-Tag: v1.5.7^2~66^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4188%2Fhead;p=thirdparty%2Fzstd.git 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. --- 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 ******************************************/