From e400d3f1bcc2d2e3619d89a1e14a6c908dee254a Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Sat, 20 May 2023 22:43:31 +0200 Subject: [PATCH] libobs: Fix struct type usage before actual include In its current form `struct dstr` is used in functions declarations in the header file before the actual type is included (as `dstr.h` is included after in `window-helpers.c`. `clang-cl` is unable to compile this code because the function signature defined in the header will not match the implementation in the source code due to the implicit forward-declaration of `struct dstr` before the type is included in the actual header. --- libobs/util/windows/window-helpers.c | 1 - libobs/util/windows/window-helpers.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/libobs/util/windows/window-helpers.c b/libobs/util/windows/window-helpers.c index e1db3716d..1828c98b1 100644 --- a/libobs/util/windows/window-helpers.c +++ b/libobs/util/windows/window-helpers.c @@ -1,6 +1,5 @@ #include "window-helpers.h" -#include #include #include diff --git a/libobs/util/windows/window-helpers.h b/libobs/util/windows/window-helpers.h index 1349981b3..c42640676 100644 --- a/libobs/util/windows/window-helpers.h +++ b/libobs/util/windows/window-helpers.h @@ -2,6 +2,7 @@ #include #include +#include #include #ifdef __cplusplus