diff --git a/Modules/_decimal/libmpdec/mpdecimal.h b/Modules/_decimal/libmpdec/mpdecimal.h index d745319012a..b7d4ff70144 100644 --- a/Modules/_decimal/libmpdec/mpdecimal.h +++ b/Modules/_decimal/libmpdec/mpdecimal.h @@ -70,7 +70,8 @@ extern "C" { #else #define UNUSED #endif - #if defined(__GNUC__) && __GNUC__ >= 4 && !defined(__INTEL_COMPILER) + #if (defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)) && \ + defined(__GNUC__) && __GNUC__ >= 4 && !defined(__INTEL_COMPILER) #define MPD_PRAGMA(x) _Pragma(x) #define MPD_HIDE_SYMBOLS_START "GCC visibility push(hidden)" #define MPD_HIDE_SYMBOLS_END "GCC visibility pop"