]> git.saurik.com Git - minimal.git/blobdiff - mapping.h
Moved _trace to stderr.
[minimal.git] / mapping.h
index 0c9bdde20d37acb68b18ed4ea167160d250eb065..2eb53d05da816076bd4a6f1ab6d0ea18f82826ac 100644 (file)
--- a/mapping.h
+++ b/mapping.h
@@ -35,6 +35,9 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
+#ifndef MINIMAL_MAPPING_H
+#define MINIMAL_MAPPING_H
+
 #include <sys/mman.h>
 
 #include <errno.h>
@@ -44,6 +47,8 @@
 #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));
@@ -63,3 +68,5 @@ void *map(const char *path, size_t offset, size_t size, size_t *psize, bool ro)
     _syscall(close(fd));
     return base;
 }
+
+#endif/*MINIMAL_MAPPING_H*/