aboutsummaryrefslogtreecommitdiff
path: root/libgfortran/io/unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgfortran/io/unix.c')
-rw-r--r--libgfortran/io/unix.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index 377cadd..e55966b 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -28,7 +28,9 @@ Boston, MA 02111-1307, USA. */
#include <sys/stat.h>
#include <fcntl.h>
+#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
+#endif
#include <string.h>
#include <errno.h>
@@ -43,6 +45,14 @@ Boston, MA 02111-1307, USA. */
#define MAP_FAILED ((void *) -1)
#endif
+#ifndef PROT_READ
+#define PROT_READ 1
+#endif
+
+#ifndef PROT_WRITE
+#define PROT_WRITE 2
+#endif
+
/* This implementation of stream I/O is based on the paper:
*
* "Exploiting the advantages of mapped files for stream I/O",