]> granicus.if.org Git - nethack/commitdiff
latest Xcode build issue
authornhmall <nhmall@nethack.org>
Tue, 4 Oct 2022 23:09:54 +0000 (19:09 -0400)
committernhmall <nhmall@nethack.org>
Tue, 4 Oct 2022 23:09:54 +0000 (19:09 -0400)
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

index 734c337e65f6a753574c5b9b178555d246e12805..d77348f852ba401fc39a77f00102395021b1457d 100644 (file)
@@ -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*/