From d4680ec8f72cabd9248d179a9a30aa5fd5badc00 Mon Sep 17 00:00:00 2001 From: Stephen Hutchinson Date: Fri, 1 Sep 2023 18:19:31 -0400 Subject: [PATCH] Fix includes of "avs/posix.h" --- src/avisynth_c/avisynth.c | 4 ++++ src/avisynth_c/avs_common.h | 1 - src/avisynth_c/avs_lib.c | 1 + src/avisynth_c/avs_utils.c | 4 ++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/avisynth_c/avisynth.c b/src/avisynth_c/avisynth.c index 166b10823..1a4dac803 100644 --- a/src/avisynth_c/avisynth.c +++ b/src/avisynth_c/avisynth.c @@ -22,6 +22,10 @@ #include "avs_common.h" #include "ff_filters.h" +#ifndef _WIN32 +#include "avs/posix.h" +#endif + #ifdef MSVC #include #define _Static_assert static_assert // for clang-cl at least 12.0 diff --git a/src/avisynth_c/avs_common.h b/src/avisynth_c/avs_common.h index f3efddcfd..9a98b1b4e 100644 --- a/src/avisynth_c/avs_common.h +++ b/src/avisynth_c/avs_common.h @@ -27,7 +27,6 @@ #undef EXTERN_C #define AVSC_NO_DECLSPEC #include "avisynth_c.h" -#include "avs/posix.h" #include "avs_lib.h" #include "avs_utils.h" #include "avs_convert.h" diff --git a/src/avisynth_c/avs_lib.c b/src/avisynth_c/avs_lib.c index 339d57f35..f9167c807 100644 --- a/src/avisynth_c/avs_lib.c +++ b/src/avisynth_c/avs_lib.c @@ -35,6 +35,7 @@ static volatile long ref = 0; #define avs_close FreeLibrary #define avs_address GetProcAddress #else +#include "avs/posix.h" #include static volatile int ref = 0; #if __APPLE__ diff --git a/src/avisynth_c/avs_utils.c b/src/avisynth_c/avs_utils.c index 32e66cbbe..923f96e7d 100644 --- a/src/avisynth_c/avs_utils.c +++ b/src/avisynth_c/avs_utils.c @@ -26,6 +26,10 @@ #include #include +#ifndef _WIN32 +#include "avs/posix.h" +#endif + enum AVPixelFormat csp_name_to_pix_fmt( const char *csp_name, enum AVPixelFormat def ) { if( !csp_name || !strcmp( csp_name, "" ) )