From 8504bacfca9f97f79c2edab68873ba99dfabb851 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 8 Apr 2021 12:18:17 +0200 Subject: Fix: libsquashfs: allow static linking on Windows If SQFS_STATIC is defined, dummy out the SQFS_API definition, so we don't try to pull stuff from a (in this case) non-existant DLL or try to export functions. Signed-off-by: David Oberhollenzer --- include/sqfs/predef.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/sqfs/predef.h b/include/sqfs/predef.h index 3254186..8a456d8 100644 --- a/include/sqfs/predef.h +++ b/include/sqfs/predef.h @@ -32,7 +32,9 @@ #include #if defined(_WIN32) || defined(__CYGWIN__) - #ifdef SQFS_BUILDING_DLL + #if defined(SQFS_STATIC) + #define SQFS_API + #elif defined(SQFS_BUILDING_DLL) #if defined(__GNUC__) || defined(__clang__) #define SQFS_API __attribute__ ((dllexport)) #else -- cgit v1.2.3