diff --git a/srcpkgs/nethack/patches/2-gcc12.patch b/srcpkgs/nethack/patches/2-gcc12.patch new file mode 100644 index 00000000000..df7ed8df5e2 --- /dev/null +++ b/srcpkgs/nethack/patches/2-gcc12.patch @@ -0,0 +1,14 @@ +--- a/include/tradstdc.h ++++ b/include/tradstdc.h +@@ -431,7 +431,11 @@ + #define NORETURN __attribute__((noreturn)) + /* disable gcc's __attribute__((__warn_unused_result__)) since explicitly + discarding the result by casting to (void) is not accepted as a 'use' */ ++#if __GNUC__ >= 11 ++#define __warn_unused_result__ unused ++#elif + #define __warn_unused_result__ /*empty*/ ++#endif + #define warn_unused_result /*empty*/ + #endif + #endif