netris: fix gcc-14 build

+68
+63
pkgs/by-name/ne/netris/configure-fixes-for-gcc-14.patch
··· 1 + From 9f82b88e17f5e04929eff96c673dac5810006c87 Mon Sep 17 00:00:00 2001 2 + From: Reno Dakota <paparodeo@proton.me> 3 + Date: Thu, 5 Dec 2024 09:49:40 +0000 4 + Subject: [PATCH] configure fixes for gcc-14 5 + 6 + --- 7 + Configure | 11 ++++++----- 8 + 1 file changed, 6 insertions(+), 5 deletions(-) 9 + 10 + diff --git a/Configure b/Configure 11 + index fbc57a8..e8cea16 100755 12 + --- a/Configure 13 + +++ b/Configure 14 + @@ -76,7 +76,7 @@ done 15 + CFLAGS="$COPT $CEXTRA" 16 + 17 + echo "Checking for libraries" 18 + -echo 'main(){}' > test.c 19 + +echo 'int main(void){ return 0; }' > test.c 20 + LFLAGS="" 21 + for lib in -lcurses -lncurses; do 22 + if $CC $CFLAGS $LEXTRA test.c $lib > /dev/null 2>&1; then 23 + @@ -91,8 +91,9 @@ done 24 + 25 + echo "Checking for on_exit()" 26 + cat << END > test.c 27 + +#include <stdlib.h> 28 + void handler(void) {} 29 + -main() { on_exit(handler, (void *)0); } 30 + +int main(void) { on_exit(handler, (void *)0); return 0; } 31 + END 32 + if $CC $CFLAGS $LEXTRA test.c > /dev/null 2>&1; then 33 + HAS_ON_EXIT=true 34 + @@ -103,7 +104,7 @@ fi 35 + echo "Checking for sigprocmask()" 36 + cat << END > test.c 37 + #include <signal.h> 38 + -main() { sigset_t set; sigprocmask(SIG_BLOCK, &set, &set); } 39 + +int main(void) { sigset_t set; sigprocmask(SIG_BLOCK, &set, &set); return 0; } 40 + END 41 + if $CC $CFLAGS $LEXTRA test.c > /dev/null 2>&1; then 42 + HAS_SIGPROCMASK=true 43 + @@ -114,7 +115,7 @@ fi 44 + echo "Checking for getopt.h" 45 + cat << END > test.c 46 + #include <getopt.h> 47 + -main(){} 48 + +int main(void){ return 0; } 49 + END 50 + 51 + if $CC $CFLAGS $LEXTRA test.c > /dev/null 2>&1; then 52 + @@ -126,7 +127,7 @@ fi 53 + echo "Checking for memory.h" 54 + cat << END > test.c 55 + #include <memory.h> 56 + -main(){} 57 + +int main(void){ return 0; } 58 + END 59 + 60 + if $CC $CFLAGS $LEXTRA test.c > /dev/null 2>&1; then 61 + -- 62 + 2.47.0 63 +
+5
pkgs/by-name/ne/netris/package.nix
··· 11 11 sha256 = "0gmxbpn50pnffidwjchkzph9rh2jm4wfq7hj8msp5vhdq5h0z9hm"; 12 12 }; 13 13 14 + patches = [ 15 + # https://github.com/naclander/netris/pull/1 16 + ./configure-fixes-for-gcc-14.patch 17 + ]; 18 + 14 19 buildInputs = [ 15 20 ncurses 16 21 ];