mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08:00
wol: Fix build for gcc 15
https://gcc.gnu.org/gcc-15/porting_to.html#c23-fn-decls-without-parameters
This commit is contained in:
19
pkgs/by-name/wo/wol/gcc-15.patch
Normal file
19
pkgs/by-name/wo/wol/gcc-15.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
diff --git a/lib/realloc.c b/lib/realloc.c
|
||||
index d0d3e4a..6e9e539 100644
|
||||
--- a/lib/realloc.c
|
||||
+++ b/lib/realloc.c
|
||||
@@ -24,8 +24,12 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
-char *malloc ();
|
||||
-char *realloc ();
|
||||
+#if STDC_HEADERS
|
||||
+# include <stdlib.h>
|
||||
+#else
|
||||
+void *malloc ();
|
||||
+void *realloc ();
|
||||
+#endif
|
||||
|
||||
/* Change the size of an allocated block of memory P to N bytes,
|
||||
with error checking. If N is zero, change it to 1. If P is NULL,
|
||||
@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
patches = [
|
||||
./gcc-14.patch
|
||||
./gcc-15.patch
|
||||
./macos-10_7-getline.patch
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user