From b4c8c53f6b25b46ff7cec92e516f36514768fe1a Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Tue, 4 Jun 2024 19:59:38 +0900 Subject: [PATCH] out_s3: windows: Link neccessary libraries for SHCreateDirectoryExA Signed-off-by: Hiroshi Hatake --- plugins/out_s3/CMakeLists.txt | 10 ++++++++++ plugins/out_s3/s3.c | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/plugins/out_s3/CMakeLists.txt b/plugins/out_s3/CMakeLists.txt index 94e04861707..6492658ab72 100644 --- a/plugins/out_s3/CMakeLists.txt +++ b/plugins/out_s3/CMakeLists.txt @@ -3,4 +3,14 @@ set(src s3_store.c s3_multipart.c) +set(libs "") + +if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") + set(libs + ${libs} + Shell32.lib + Shlwapi.lib) +endif() + FLB_PLUGIN(out_s3 "${src}" "") +target_link_libraries(flb-plugin-out_s3 ${libs}) diff --git a/plugins/out_s3/s3.c b/plugins/out_s3/s3.c index 0c80a855159..0850d6354eb 100644 --- a/plugins/out_s3/s3.c +++ b/plugins/out_s3/s3.c @@ -39,6 +39,10 @@ #include +#ifdef FLB_SYSTEM_WINDOWS +#include +#endif + #include "s3.h" #include "s3_store.h"