Skip to content

Commit

Permalink
mingw does not support the weak attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
rfm committed Jan 8, 2025
1 parent 7e66968 commit aa0aa08
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Source/GSArray.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,17 @@
*/
#if !GNUSTEP_WITH_ASAN
static Class GSInlineArrayClass;
#if defined(__WIN32)
static int (*lsanCheck)(void) = NULL; // No weak symbol support :-(
#else
/* For runtime detection of LSAN, we use a weak symbol for one of its
* library functions. Then, if lsanCheck is not zero we try to change
* behavior to avoid false positives.
*/
int __lsan_do_recoverable_leak_check(void) __attribute__((weak));
static int (*lsanCheck)(void) = __lsan_do_recoverable_leak_check;
#endif
#endif

/* This class stores objects inline in data beyond the end of the instance.
*/
Expand Down

0 comments on commit aa0aa08

Please sign in to comment.