pkgsrc/lang/go14/patches/patch-src_runtime_malloc.h
maya 8487a6271e go14: fix bootstrap for newer openbsd.
openbsd requires mapping the stack with MAP_STACK. binaries not doing this
will not run. patch taken from openbsd ports, via sjmulder.

I modified it to use GOOS_openbsd, because other OSes are not provided
an implementation of sysMarkStack.

Bump PKGREVISION.
2019-04-13 23:09:40 +00:00

16 lines
655 B
C

$NetBSD: patch-src_runtime_malloc.h,v 1.1 2019/04/13 23:09:40 maya Exp $
$OpenBSD: patch-src_runtime_malloc_h,v 1.1 2018/04/05 17:47:30 jsing Exp $
OpenBSD 6.4 needs stack pages to be mapped with MAP_STACK.
Index: src/runtime/malloc.h
--- src/runtime/malloc.h.orig
+++ src/runtime/malloc.h
@@ -197,6 +197,7 @@ struct MLink
// if accessed. Used only for debugging the runtime.
void* runtime·sysAlloc(uintptr nbytes, uint64 *stat);
+void runtime·sysMarkStack(void *v, uintptr nbytes);
void runtime·SysFree(void *v, uintptr nbytes, uint64 *stat);
void runtime·SysUnused(void *v, uintptr nbytes);
void runtime·SysUsed(void *v, uintptr nbytes);