summaryrefslogtreecommitdiff
path: root/dev-lang/ghc/files/ghc-9.2.8-use-stdlib.patch
diff options
context:
space:
mode:
authorYiyang Wu <xgreenlandforwyy@gmail.com>2025-05-02 21:20:15 +0800
committerMark Wright <gienah@gentoo.org>2025-05-21 16:12:16 +1000
commitc12877706de776b01a12d40c0d03d310792078f5 (patch)
tree0fc107f80c654f1ecf8219aafa191e179b2d3d24 /dev-lang/ghc/files/ghc-9.2.8-use-stdlib.patch
parent7184371bbcd814bbc9b0d98924b1d9309c4b990a (diff)
downloadgentoo-c12877706de776b01a12d40c0d03d310792078f5.tar.gz
gentoo-c12877706de776b01a12d40c0d03d310792078f5.tar.bz2
gentoo-c12877706de776b01a12d40c0d03d310792078f5.zip
dev-lang/ghc: use stdlib malloc and realloc to gcc-15 compile error
Closes: https://bugs.gentoo.org/946695 Closes: https://github.com/gentoo/gentoo/pull/41899 Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com> Signed-off-by: Mark Wright <gienah@gentoo.org>
Diffstat (limited to 'dev-lang/ghc/files/ghc-9.2.8-use-stdlib.patch')
-rw-r--r--dev-lang/ghc/files/ghc-9.2.8-use-stdlib.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/dev-lang/ghc/files/ghc-9.2.8-use-stdlib.patch b/dev-lang/ghc/files/ghc-9.2.8-use-stdlib.patch
new file mode 100644
index 000000000000..424f0a5b9196
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-9.2.8-use-stdlib.patch
@@ -0,0 +1,25 @@
+Use stdlib's malloc and realloc instead of extern to avoid conflict
+Reference: https://src.fedoraproject.org/rpms/ghc9.12/blob/12ecf74c5a603b552da365829135e5b62e252db1/f/hp2ps-C-gnu17.patch
+===================================================================
+--- ghc-9.2.8.orig/utils/hp2ps/Utilities.c
++++ ghc-9.2.8/utils/hp2ps/Utilities.c
+@@ -1,10 +1,9 @@
+ #include "Main.h"
+ #include <stdio.h>
+ #include <string.h>
++#include <stdlib.h>
+ #include "Error.h"
+
+-extern void* malloc();
+-
+ char*
+ Basename(char *name)
+ {
+@@ -89,7 +88,6 @@ void *
+ xrealloc(void *p, size_t n)
+ {
+ void *r;
+- extern void *realloc();
+
+ r = realloc(p, n);
+ if (!r) {