From 9c3cc6a8a51c4c4f01be7149d8522a713df2149a Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 29 Dec 2024 10:48:41 +0100 Subject: Enable mingw/gcc build --- src/configure.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/configure.cc') diff --git a/src/configure.cc b/src/configure.cc index d2c1053..da5dbfd 100644 --- a/src/configure.cc +++ b/src/configure.cc @@ -27,7 +27,7 @@ const std::filesystem::path configHeaderFile("config.h"); std::map external_includedir; std::map external_libdir; -#if !defined(_WIN32) +#if !defined(_WIN32) || defined(__MINGW32__) const ctor::configuration& __attribute__((weak)) ctor::get_configuration() #else const ctor::configuration& default_get_configuration() @@ -49,7 +49,7 @@ const ctor::configuration& default_get_configuration() } return cfg; } -#if defined(_WIN32) +#if defined(_WIN32) && !defined(__MINGW32__) // Hack to make ctor::get_configuration "weak" linked // See: // https://stackoverflow.com/questions/2290587/gcc-style-weak-linking-in-visual-studio -- cgit v1.2.3