diff --git a/include/event2/visibility.h b/include/event2/visibility.h index 412a061c..779eb68d 100644 --- a/include/event2/visibility.h +++ b/include/event2/visibility.h @@ -51,4 +51,16 @@ #endif /* event_*_EXPORTS */ +/** We need to dllimport event_debug_logging_mask_ into event_extra */ +#if defined(_MSC_VER) +# if defined(event_core_shared_EXPORTS) /** from core export */ +# define EVENT2_CORE_EXPORT_SYMBOL __declspec(dllexport) +# elif defined(event_extra_shared_EXPORTS) /** from extra import */ +# define EVENT2_CORE_EXPORT_SYMBOL __declspec(dllimport) +# endif +#endif /* _MSC_VER */ +#if !defined(EVENT2_CORE_EXPORT_SYMBOL) +# define EVENT2_CORE_EXPORT_SYMBOL EVENT2_EXPORT_SYMBOL +#endif + #endif /* EVENT2_VISIBILITY_H_INCLUDED_ */ diff --git a/log-internal.h b/log-internal.h index fb53df41..2c31608b 100644 --- a/log-internal.h +++ b/log-internal.h @@ -48,7 +48,7 @@ extern "C" { #endif #ifdef EVENT_DEBUG_LOGGING_ENABLED -EVENT2_EXPORT_SYMBOL extern ev_uint32_t event_debug_logging_mask_; +EVENT2_CORE_EXPORT_SYMBOL extern ev_uint32_t event_debug_logging_mask_; #define event_debug_get_logging_mask_() (event_debug_logging_mask_) #else #define event_debug_get_logging_mask_() (0)