* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef MINIMAL_MAPPING_H
+#define MINIMAL_MAPPING_H
+
#include <sys/mman.h>
#include <errno.h>
#include <sys/stat.h>
#include <fcntl.h>
+#include "minimal/stdlib.h"
+
void *map(const char *path, size_t offset, size_t size, size_t *psize, bool ro) {
int fd;
_syscall(fd = open(path, ro ? O_RDONLY : O_RDWR));
_syscall(close(fd));
return base;
}
+
+#endif/*MINIMAL_MAPPING_H*/