From 33351202cb1af2b2ee96f43a9492fcb21f437986 Mon Sep 17 00:00:00 2001 From: bwvb Date: Thu, 16 May 2024 10:31:47 +0200 Subject: [PATCH 1/2] In src/futils.cpp Added #include --- src/futils.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/futils.cpp b/src/futils.cpp index 94629a3e30..5ddb10a752 100644 --- a/src/futils.cpp +++ b/src/futils.cpp @@ -11,6 +11,7 @@ // + standard includes #include #include +#include #include #include #include From 26aea5ce0a9bc065af966cfe7d744205911b0212 Mon Sep 17 00:00:00 2001 From: bwvb Date: Thu, 16 May 2024 21:27:07 +0200 Subject: [PATCH 2/2] Added compile option -fPIC. Required with clang++ when linking application with static library libexiv2.a --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 01a704b112..c938c0883f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,6 +67,7 @@ option(EXIV2_TEAM_OSS_FUZZ "Build config for OSS-Fuzz" OFF) option(EXIV2_TEAM_PACKAGING "Additional stuff for generating packages" OFF) set(EXTRA_COMPILE_FLAGS " ") +add_compile_options( "-fPIC" ) mark_as_advanced(EXIV2_TEAM_EXTRA_WARNINGS EXIV2_TEAM_WARNINGS_AS_ERRORS EXIV2_ENABLE_EXTERNAL_XMP EXTRA_COMPILE_FLAGS EXIV2_TEAM_USE_SANITIZERS)