Commit c549cc92 authored by langsjo's avatar langsjo Committed by Bjørn Forsman
Browse files

gopher: fix build for GCC 14

The project's configure file tested if the C compiler worked by
compiling a small program, but that test program does not compile on GCC
14. This commit adds a patch which makes that test program work with GCC
14
parent 7e1c9bd1
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
diff --git a/configure b/configure
index 1b20711..79ce215 100644
--- a/configure
+++ b/configure
@@ -679,7 +679,7 @@ cat > conftest.$ac_ext << EOF
 #line 680 "configure"
 #include "confdefs.h"
 
-main(){return(0);}
+int main(){return(0);}
 EOF
 if { (eval echo configure:685: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
+4 −0
Original line number Diff line number Diff line
@@ -18,6 +18,10 @@ stdenv.mkDerivation rec {

  buildInputs = [ ncurses ];

  patches = [
    ./int_main.patch # https://github.com/jgoerzen/gopher/pull/8
  ];

  preConfigure = "export LIBS=-lncurses";

  meta = with lib; {