]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
pkey_alloc.2, mprotect.2: _GNU_SOURCE is required for the pkey functions.
authorMark Wielaard <mark@klomp.org>
Wed, 29 May 2019 23:05:55 +0000 (01:05 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Fri, 14 Jun 2019 15:09:00 +0000 (17:09 +0200)
To get the pkey_alloc, pkey_free and pkey_mprotect functions
_GNU_SOURCE needs to be defined before including sys/mman.h.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
Signed-off-by: Mark Wielaard <mark@klomp.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/mprotect.2
man2/pkey_alloc.2

index cbbfd51377fde0ccee9bfda7fee30bf56c9a8804..866ac7736b23b9d8e6df7eb8c41e0fc35050b9ac 100644 (file)
@@ -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
index ce9bd96cd5c11a1045f2a97bd72a6d61778624b0..d82f316a8250d190e9ae1d76378c5d90cd368d6f 100644 (file)
@@ -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 ");"