From d3bc39b312a859e514b2a851e2fe411b5e434049 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 5 Oct 2023 10:00:41 +0000 Subject: [PATCH] Fix mingw build (broke by prev. commit) --- generic/tclBasic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 8827d172a8f..9d84de282fd 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -29,7 +29,7 @@ * compatible with AddressSanitizer (ASan) use-after-return detection. */ -#if defined(HAVE_INTRIN_H) +#if defined(_MSC_VER) && defined(HAVE_INTRIN_H) #include /* for _AddressOfReturnAddress() */ #endif @@ -44,10 +44,10 @@ void * TclGetCStackPtr(void) { -#if defined(HAVE_INTRIN_H) - return _AddressOfReturnAddress(); -#elif __GNUC__ || __has_builtin(__builtin_frame_address) +#if __GNUC__ || __has_builtin(__builtin_frame_address) return __builtin_frame_address(0); +#elif defined(_MSC_VER) && defined(HAVE_INTRIN_H) + return _AddressOfReturnAddress(); #else size_t unused = 0; /*