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>
.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
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 ");"