]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
blind fix for QNX 4188/head
authorYann Collet <yann.collet.73@gmail.com>
Tue, 5 Nov 2024 08:09:13 +0000 (00:09 -0800)
committerYann Collet <yann.collet.73@gmail.com>
Tue, 5 Nov 2024 08:09:13 +0000 (00:09 -0800)
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

index 571d3942198b53cd222530619f1bd5d6e540d0d7..ec813968446a9bd94f5b5c6721ca955e3cf1de58 100644 (file)
 #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 <stddef.h>       /* size_t, ptrdiff_t */
+#include <stdio.h>        /* FILE */
 #include <sys/types.h>    /* stat, utime */
 #include <sys/stat.h>     /* 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
 ******************************************/