From 13028143af8fbdc453ee261c957eac8617da9da4 Mon Sep 17 00:00:00 2001 From: nhmall Date: Tue, 4 Oct 2022 19:09:54 -0400 Subject: [PATCH] latest Xcode build issue MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit An Xcode update has started causing the same problem that was experienced on Linux with newer compiler or glibc a while back. ˜ In file included from monst.c:6: In file included from ../include/config.h:670: In file included from ../include/integer.h:54: In file included from /Applications/Xcode_14.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/14.0.0/include/stdint.h:52: In file included from /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdint.h:52: In file included from /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/_types.h:32: /Applications/Xcode_14.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/cdefs.h:302:39: error: too few arguments provided to function-like macro invocation ^ 1 error generated. make[1]: *** [monst.o] Error 1 Please enter the commit message for your changes. Lines starting --- include/tradstdc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tradstdc.h b/include/tradstdc.h index 734c337e6..d77348f85 100644 --- a/include/tradstdc.h +++ b/include/tradstdc.h @@ -404,7 +404,7 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */ #if __GNUC__ >= 3 #define UNUSED __attribute__((unused)) #define NORETURN __attribute__((noreturn)) -#if !defined(__linux__) || defined(GCC_URWARN) +#if (!defined(__linux__) && !defined(MACOS)) || defined(GCC_URWARN) /* disable gcc's __attribute__((__warn_unused_result__)) since explicitly discarding the result by casting to (void) is not accepted as a 'use' */ #define __warn_unused_result__ /*empty*/