summaryrefslogtreecommitdiffstats
path: root/lib/lz4.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lz4.h')
-rw-r--r--lib/lz4.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/lz4.h b/lib/lz4.h
index bebe761..b0537fc 100644
--- a/lib/lz4.h
+++ b/lib/lz4.h
@@ -72,11 +72,15 @@ extern "C" {
/*
* LZ4_DLL_EXPORT :
* Enable exporting of functions when building a Windows DLL
+* LZ4LIB_API :
+* Control library symbols visibility.
*/
#if defined(LZ4_DLL_EXPORT) && (LZ4_DLL_EXPORT==1)
# define LZ4LIB_API __declspec(dllexport)
#elif defined(LZ4_DLL_IMPORT) && (LZ4_DLL_IMPORT==1)
# define LZ4LIB_API __declspec(dllimport) /* It isn't required but allows to generate better code, saving a function pointer load from the IAT and an indirect jump.*/
+#elif defined(__GNUC__) && (__GNUC__ >= 4)
+# define LZ4LIB_API __attribute__ ((__visibility__ ("default")))
#else
# define LZ4LIB_API
#endif