[PATCH] pkey_alloc.2, mprotect.2: _GNU_SOURCE is required for the pkey functions.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To get the pkey_alloc, pkey_free and pkey_mprotect functions
_GNU_SOURCE needs to be defined before including sys/mman.h.

Signed-off-by: Mark Wielaard <mark@xxxxxxxxx>
---
 man2/mprotect.2   | 4 ++++
 man2/pkey_alloc.2 | 1 +
 2 files changed, 5 insertions(+)

diff --git a/man2/mprotect.2 b/man2/mprotect.2
index 9bb02eb..4d29f66 100644
--- a/man2/mprotect.2
+++ b/man2/mprotect.2
@@ -38,6 +38,10 @@ mprotect, pkey_mprotect \- set protection on a region of memory
 .B #include <sys/mman.h>
 .PP
 .BI "int mprotect(void *" addr ", size_t " len ", int " prot );
+
+.BR "#define _GNU_SOURCE" "             /* See feature_test_macros(7) */"
+.B #include <sys/mman.h>
+.PP
 .BI "int pkey_mprotect(void *" addr ", size_t " len ", int " prot ", int " pkey ");
 .fi
 .SH DESCRIPTION
diff --git a/man2/pkey_alloc.2 b/man2/pkey_alloc.2
index ce9bd96..d82f316 100644
--- a/man2/pkey_alloc.2
+++ b/man2/pkey_alloc.2
@@ -27,6 +27,7 @@
 pkey_alloc, pkey_free \- allocate or free a protection key
 .SH SYNOPSIS
 .nf
+.BR "#define _GNU_SOURCE" "             /* See feature_test_macros(7) */"
 .B #include <sys/mman.h>
 .PP
 .BI "int pkey_alloc(unsigned int " flags ", unsigned int " access_rights ");"
-- 
1.8.3.1




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux