[patch] memfd_create.2: _GNU_SOURCE is required

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 man2/memfd_create.2 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/man2/memfd_create.2 b/man2/memfd_create.2
index 2c73c27..2060b18 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 <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>
--
2.7.4



[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux