memfd_create.2: _GNU_SOURCE is required

The memfd_create function and its corresponding constants have
required _GNU_SOURCE for as long as they've been in glibc.

Signed-off-by: Joseph C. Sible <josephcsible@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Joseph C. Sible 2018-09-03 18:35:30 -04:00 committed by Michael Kerrisk
parent c2df769494
commit d6d367c7e8
1 changed files with 4 additions and 0 deletions

View File

@ -22,6 +22,8 @@
.SH NAME
memfd_create \- create an anonymous file
.SH SYNOPSIS
.nf
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <sys/mman.h>
.PP
.BI "int memfd_create(const char *" name ", unsigned int " flags ");"
@ -396,6 +398,7 @@ Existing seals: WRITE SHRINK
.SS Program source: t_memfd_create.c
\&
.EX
#define _GNU_SOURCE
#include <sys/mman.h>
#include <fcntl.h>
#include <stdlib.h>
@ -478,6 +481,7 @@ main(int argc, char *argv[])
.SS Program source: t_get_seals.c
\&
.EX
#define _GNU_SOURCE
#include <sys/mman.h>
#include <fcntl.h>
#include <unistd.h>