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 . If it is not set after including that file, fall back to /dev/mem and /dev/kmem respectively. Author: Niklas Cathor Last-Update: 2020-04-08 Index: memdump/memdump.c =================================================================== --- memdump/memdump.c.orig +++ memdump/memdump.c @@ -121,6 +121,12 @@ #ifdef LINUX2 #include #define GETPAGESIZE getpagesize + +#ifndef _PATH_MEM +#define _PATH_MEM "/dev/mem" +#define _PATH_KMEM "/dev/kmem" +#endif + #define SUPPORTED #endif