1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-16 04:35:13 +03:00
aports/testing/memdump/06-fall-back-to-default-dev-mem.patch
Niklas Cathor b58feaab7a testing/memdump: new aport
http://www.porcupine.org/forensics/tct.html
utility to dump memory contents to standard output
2020-04-10 09:03:15 +00:00

23 lines
653 B
Diff

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