summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--newlib/libc/sys/rtems/include/sys/mman.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/newlib/libc/sys/rtems/include/sys/mman.h b/newlib/libc/sys/rtems/include/sys/mman.h
index f74f47360..4ac4f34c6 100644
--- a/newlib/libc/sys/rtems/include/sys/mman.h
+++ b/newlib/libc/sys/rtems/include/sys/mman.h
@@ -29,7 +29,7 @@
* SUCH DAMAGE.
*
* @(#)mman.h 8.2 (Berkeley) 1/9/95
- * $FreeBSD: head/sys/sys/mman.h 326023 2017-11-20 19:43:44Z pfg $
+ * $FreeBSD: head/sys/sys/mman.h 349240 2019-06-20 18:24:16Z brooks $
*/
#ifndef _SYS_MMAN_H_
@@ -55,6 +55,14 @@
#define PROT_READ 0x01 /* pages can be read */
#define PROT_WRITE 0x02 /* pages can be written */
#define PROT_EXEC 0x04 /* pages can be executed */
+#if __BSD_VISIBLE
+#define _PROT_ALL (PROT_READ | PROT_WRITE | PROT_EXEC)
+#define PROT_EXTRACT(prot) ((prot) & _PROT_ALL)
+
+#define _PROT_MAX_SHIFT 16
+#define PROT_MAX(prot) ((prot) << _PROT_MAX_SHIFT)
+#define PROT_MAX_EXTRACT(prot) (((prot) >> _PROT_MAX_SHIFT) & _PROT_ALL)
+#endif
/*
* Flags contain sharing type and options.