]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
memfd_create.2: Fix header for memfd_create()
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 20 Jul 2018 01:14:25 +0000 (18:14 -0700)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Sat, 4 Aug 2018 10:34:09 +0000 (12:34 +0200)
sys/memfd.h doesn't exist. memfd_create() is declared in
sys/mman.h and some flags are available only in linux/memfd.h.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
man2/memfd_create.2

index 678814285cfb19d0085d03ee9946e0957ef68398..2c73c27b239cdea2e7a8274290d92a49a0c762c1 100644 (file)
@@ -22,7 +22,7 @@
 .SH NAME
 memfd_create \- create an anonymous file
 .SH SYNOPSIS
-.B #include <sys/memfd.h>
+.B #include <sys/mman.h>
 .PP
 .BI "int memfd_create(const char *" name ", unsigned int " flags ");"
 .SH DESCRIPTION
@@ -121,7 +121,7 @@ to select alternative hugetlb page sizes (respectively, 2\ MB, 1\ GB, ...)
 on systems that support multiple hugetlb page sizes.
 Definitions for known
 huge page sizes are included in the header file
-.I <sys/memfd.h>.
+.I <linux/memfd.h>.
 .IP
 For details on encoding huge page sizes not included in the header file,
 see the discussion of the similarly named constants in
@@ -396,7 +396,7 @@ Existing seals: WRITE SHRINK
 .SS Program source: t_memfd_create.c
 \&
 .EX
-#include <sys/memfd.h>
+#include <sys/mman.h>
 #include <fcntl.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -478,7 +478,7 @@ main(int argc, char *argv[])
 .SS Program source: t_get_seals.c
 \&
 .EX
-#include <sys/memfd.h>
+#include <sys/mman.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <stdlib.h>