aboutsummaryrefslogtreecommitdiffhomepage
path: root/midimonster.h
diff options
context:
space:
mode:
authorcbdev <cb@cbcdn.com>2019-12-04 01:21:14 +0100
committercbdev <cb@cbcdn.com>2019-12-04 01:21:14 +0100
commit1107a91861189d28d771d02d721d61b403aac38a (patch)
tree8fb26aa55dcd4aadf645485d91522414e4f21bd5 /midimonster.h
parentbd9ab579eba35db70ad1ce17d556aeda5866156d (diff)
downloadmidimonster-1107a91861189d28d771d02d721d61b403aac38a.tar.gz
midimonster-1107a91861189d28d771d02d721d61b403aac38a.tar.bz2
midimonster-1107a91861189d28d771d02d721d61b403aac38a.zip
Explicitly mark the backend init symbol visible
Diffstat (limited to 'midimonster.h')
-rw-r--r--midimonster.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/midimonster.h b/midimonster.h
index 3922b03..1192d6a 100644
--- a/midimonster.h
+++ b/midimonster.h
@@ -5,6 +5,7 @@
#include <stdint.h>
#include <inttypes.h>
+/* API call attributes and visibilities */
#ifndef MM_API
#ifdef _WIN32
#define MM_API __attribute__((dllimport))
@@ -13,6 +14,15 @@
#endif
#endif
+/* Some build systems may apply the -fvisibility=hidden parameter from the core build to the backends, so mark the init function visible */
+#ifndef MM_PLUGIN_API
+ #ifdef _WIN32
+ #define MM_PLUGIN_API __attribute__((dllexport))
+ #else
+ #define MM_PLUGIN_API __attribute__((visibility ("default")))
+ #endif
+#endif
+
/* Straight-forward min / max macros */
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define min(a,b) (((a) < (b)) ? (a) : (b))