mirror of https://github.com/mkerrisk/man-pages
pkey_alloc.2, mprotect.2: _GNU_SOURCE is required for the pkey functions.
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>
This commit is contained in:
parent
a4a0b74234
commit
f92ea96bab
|
@ -38,6 +38,10 @@ mprotect, pkey_mprotect \- set protection on a region of memory
|
||||||
.B #include <sys/mman.h>
|
.B #include <sys/mman.h>
|
||||||
.PP
|
.PP
|
||||||
.BI "int mprotect(void *" addr ", size_t " len ", int " prot );
|
.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 ");
|
.BI "int pkey_mprotect(void *" addr ", size_t " len ", int " prot ", int " pkey ");
|
||||||
.fi
|
.fi
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
pkey_alloc, pkey_free \- allocate or free a protection key
|
pkey_alloc, pkey_free \- allocate or free a protection key
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
|
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
|
||||||
.B #include <sys/mman.h>
|
.B #include <sys/mman.h>
|
||||||
.PP
|
.PP
|
||||||
.BI "int pkey_alloc(unsigned int " flags ", unsigned int " access_rights ");"
|
.BI "int pkey_alloc(unsigned int " flags ", unsigned int " access_rights ");"
|
||||||
|
|
Loading…
Reference in New Issue