Module: wine Branch: master Commit: 44e1e9438c867b6adfecaad6e87967f6fe26c7e1 URL: https://gitlab.winehq.org/wine/wine/-/commit/44e1e9438c867b6adfecaad6e87967f...
Author: Alex Henrie alexhenrie24@gmail.com Date: Wed Feb 8 22:04:59 2023 -0700
include: Allow multiple definitions on GCC with DECLSPEC_SELECTANY.
Needed to compile Tera Term.
As far as I can tell, GCC has always supported __attribute__((weak)).
---
include/winnt.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/winnt.h b/include/winnt.h index 66f6b7ad809..e15ac364ef2 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -118,6 +118,8 @@ extern "C" { #define DECLSPEC_SELECTANY __declspec(selectany) #elif defined(__MINGW32__) #define DECLSPEC_SELECTANY __attribute__((selectany)) +#elif defined(__GNUC__) +#define DECLSPEC_SELECTANY __attribute__((weak)) #else #define DECLSPEC_SELECTANY #endif