From 9f3501785f190a14642fc0c353789e706a0e216a Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 17 Oct 2024 08:27:26 +0300 Subject: [PATCH] Fix 'MADV_DONTNEED undeclared' compiler error in os_dep.c on Cosmo (fix of commit a72ac8b0d) Issue #666 (bdwgc). Note: the error was observed when compiling on Darwin only. * include/private/gc_priv.h [!__linux__ && __COSMOPOLITAN__ && USE_MUNMAP && !_GNU_SOURCE] (_GNU_SOURCE): Define. --- include/private/gc_priv.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index f1e6e6e46..04646702d 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -28,6 +28,7 @@ #if (defined(__linux__) || defined(__GLIBC__) || defined(__GNU__) \ || defined(__CYGWIN__) || defined(HAVE_DLADDR) \ + || (defined(__COSMOPOLITAN__) && defined(USE_MUNMAP)) \ || defined(GC_HAVE_PTHREAD_SIGMASK) \ || defined(HAVE_PTHREAD_SETNAME_NP_WITHOUT_TID) \ || defined(HAVE_PTHREAD_SETNAME_NP_WITH_TID_AND_ARG) \