aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-04-08 12:18:17 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2021-06-07 14:37:14 +0200
commit8504bacfca9f97f79c2edab68873ba99dfabb851 (patch)
tree9a57ed054b15c9517aa70c55bc572081a9590292 /include
parent7a2e1a0a7a575c64eaf050c8ec08e5b36e4acfad (diff)
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/sqfs/predef.h4
1 files changed, 3 insertions, 1 deletions
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 <stdint.h>
#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