blob: c35f1e44adf82f19297891be9a9056ecf5511e0c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
Description: Fall back to default /dev/(k)mem on linux
Some C libraries (e.g. musl c) don't set _PATH_MEM or _PATH_KMEM
in <paths.h>. If it is not set after including that file, fall
back to /dev/mem and /dev/kmem respectively.
Author: Niklas Cathor <niklas.cathor@gmx.de>
Last-Update: 2020-04-08
Index: memdump/memdump.c
===================================================================
--- memdump/memdump.c.orig
+++ memdump/memdump.c
@@ -121,6 +121,12 @@
#ifdef LINUX2
#include <paths.h>
#define GETPAGESIZE getpagesize
+
+#ifndef _PATH_MEM
+#define _PATH_MEM "/dev/mem"
+#define _PATH_KMEM "/dev/kmem"
+#endif
+
#define SUPPORTED
#endif
|