From 663269e9a6afb45906faa39adaa63fa7dcca2685 Mon Sep 17 00:00:00 2001 From: "Joshua M. Doe" Date: Tue, 14 Apr 2020 12:37:17 -0400 Subject: [PATCH] klv: add export macro for gcc --- gst-libs/klv/klv.h | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/gst-libs/klv/klv.h b/gst-libs/klv/klv.h index 4964d74..7c5b37f 100644 --- a/gst-libs/klv/klv.h +++ b/gst-libs/klv/klv.h @@ -25,10 +25,21 @@ // FIXME: include this for now until gst-plugins-base MR124 is accepted //#define GST_API_EXPORT __declspec(dllexport) extern //#define GST_TAG_API GST_API_EXPORT -#ifdef BUILDING_GST_KLV -#define GST_KLV_API __declspec(dllexport) extern +#if defined (_MSC_VER) + #define GST_KLV_EXPORT __declspec(dllexport) + #define GST_KLV_IMPORT __declspec(dllimport) +#elif defined (__GNUC__) + #define GST_KLV_EXPORT __attribute__((visibility("default"))) + #define GST_KLV_IMPORT #else -#define GST_KLV_API __declspec(dllimport) extern + #define GST_KLV_EXPORT + #define GST_KLV_IMPORT +#endif + +#ifdef BUILDING_GST_KLV +#define GST_KLV_API GST_KLV_EXPORT +#else +#define GST_KLV_API GST_KLV_IMPORT #endif #define GST_TAG_API GST_KLV_API