aboutsummaryrefslogtreecommitdiffstats
path: root/testing/memdump/06-fall-back-to-default-dev-mem.patch
diff options
context:
space:
mode:
authorNiklas Cathor <niklas.cathor@gmx.de>2020-04-08 15:26:05 +0200
committerRasmus Thomsen <oss@cogitri.dev>2020-04-10 09:03:15 +0000
commitb58feaab7a22d8ddf49a6929fc4579929b7ee5bd (patch)
tree6b15ad0f27bf5fb125255a36e6d8a64b86ce2050 /testing/memdump/06-fall-back-to-default-dev-mem.patch
parent2edb15dec95097e45c960d433bc3bd9ffb99d4ea (diff)
downloadaports-b58feaab7a22d8ddf49a6929fc4579929b7ee5bd.tar.bz2
aports-b58feaab7a22d8ddf49a6929fc4579929b7ee5bd.tar.xz
testing/memdump: new aport
http://www.porcupine.org/forensics/tct.html utility to dump memory contents to standard output
Diffstat (limited to 'testing/memdump/06-fall-back-to-default-dev-mem.patch')
-rw-r--r--testing/memdump/06-fall-back-to-default-dev-mem.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/testing/memdump/06-fall-back-to-default-dev-mem.patch b/testing/memdump/06-fall-back-to-default-dev-mem.patch
new file mode 100644
index 0000000000..c35f1e44ad
--- /dev/null
+++ b/testing/memdump/06-fall-back-to-default-dev-mem.patch
@@ -0,0 +1,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
+