summaryrefslogtreecommitdiff
path: root/util/nvramtool/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'util/nvramtool/common.h')
-rw-r--r--util/nvramtool/common.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/util/nvramtool/common.h b/util/nvramtool/common.h
index 8ad0f65a38..0ca2829417 100644
--- a/util/nvramtool/common.h
+++ b/util/nvramtool/common.h
@@ -58,6 +58,21 @@
#define LINE_EOF (COMMON_RESULT_START + 0)
#define LINE_TOO_LONG (COMMON_RESULT_START + 1)
+#ifdef __MINGW32__
+#define PROT_READ 1
+#define PROT_WRITE 2
+#define MAP_PRIVATE 1
+
+void *win32_mmap(void *start, size_t length, int prot, int flags, int fd, off_t offset);
+int win32_munmap(void *start, size_t length);
+
+#define mmap win32_mmap
+#define munmap win32_munmap
+
+#define MAP_FAILED ((void *)-1)
+#define MAP_SHARED 1
+#endif
+
/* basename of this program, as reported by argv[0] */
extern const char prog_name[];