From d6d367c7e88ce14ae6fcfe6b375bbd5c5c7cb00d Mon Sep 17 00:00:00 2001 From: "Joseph C. Sible" Date: Mon, 3 Sep 2018 18:35:30 -0400 Subject: [PATCH] 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 Signed-off-by: Michael Kerrisk --- man2/memfd_create.2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/man2/memfd_create.2 b/man2/memfd_create.2 index 2c73c27b2..2060b18b2 100644 --- a/man2/memfd_create.2 +++ b/man2/memfd_create.2 @@ -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 .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 #include #include @@ -478,6 +481,7 @@ main(int argc, char *argv[]) .SS Program source: t_get_seals.c \& .EX +#define _GNU_SOURCE #include #include #include