diff --git a/src/base/export-template.h b/src/base/export-template.h
index 861cfe4..b9812d0 100644
--- a/src/base/export-template.h
+++ b/src/base/export-template.h
@@ -153,7 +153,9 @@
 
 EXPORT_TEMPLATE_TEST(DEFAULT, );
 EXPORT_TEMPLATE_TEST(DEFAULT, __attribute__((visibility("default"))));
+#ifdef _MSC_VER
 EXPORT_TEMPLATE_TEST(MSVC_HACK, __declspec(dllexport));
+#endif
 EXPORT_TEMPLATE_TEST(DEFAULT, __declspec(dllimport));
 
 #undef EXPORT_TEMPLATE_TEST
