summaryrefslogtreecommitdiff
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-04-09 11:55:04 +0200
commitf92d3354df3c0bb930b103a58d905a77a7281a26 (patch)
treeeec645776198a62928574b3d1742b426ede59ca9 /include
parent65955d6c48319124c12c7901fb0c0cf8a466a1a1 (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