~ruther/guix-local

ref: 25e2662e7e65db2d2c3f9479a352e3507bcb46e9 guix-local/gnu/packages/patches/inferno-fix-crash.patch -rw-r--r-- 499 bytes
25e2662e — Maxim Cournoyer gnu: dhtnet: Update to 0.0.1-6.6dd5a5e and enable natpmp support. 2 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Fixes crash.
Patch from <https://github.com/inferno-os/inferno-os/pull/13>.

diff --git a/emu/Linux/os.c b/emu/Linux/os.c
index 08b039d6..0d8a0cf3 100644
--- a/emu/Linux/os.c
+++ b/emu/Linux/os.c
@@ -18,6 +18,9 @@
 
 #include	<raise.h>
 
+/* For dynamic linking init/fini code that needs malloc */
+void (*coherence)(void) = nofence;
+
 /* glibc 2.3.3-NTPL messes up getpid() by trying to cache the result, so we'll do it ourselves */
 #include	<sys/syscall.h>
 #define	getpid()	syscall(SYS_getpid)