wol: Fix build for GCC 15 (#475995)

This commit is contained in:
Peter Hoeg
2026-01-01 19:54:30 +00:00
committed by GitHub
2 changed files with 20 additions and 0 deletions

View 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,

View File

@@ -17,6 +17,7 @@ stdenv.mkDerivation rec {
patches = [
./gcc-14.patch
./gcc-15.patch
./macos-10_7-getline.patch
];