[22/39] mmap2.2: Use syscall(SYS_...); for system calls without a wrapper

Message ID 20210510175546.28445-23-alx.manpages@gmail.com
State Not applicable
Headers
Series man2: SYNOPSIS: Fix headers, use syscall(), and other fixes |

Checks

Context Check Description
dj/TryBot-apply_patch fail Patch failed to apply to master at the time it was sent

Commit Message

Alejandro Colomar May 10, 2021, 5:55 p.m. UTC
  Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/mmap2.2 | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
  

Patch

diff --git a/man2/mmap2.2 b/man2/mmap2.2
index 6545a8f52..d579a285d 100644
--- a/man2/mmap2.2
+++ b/man2/mmap2.2
@@ -31,11 +31,13 @@ 
 mmap2 \- map files or devices into memory
 .SH SYNOPSIS
 .nf
-.B #include <sys/mman.h>
+.BR "#include <sys/mman.h>" "    /* Definition of " MAP_* " and " PROT_* " constants */"
+.BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
+.BR "#include <unistd.h>
 .PP
-.BI "void *mmap2(unsigned long " addr ", unsigned long " length ,
-.BI "            unsigned long " prot ", unsigned long " flags ,
-.BI "            unsigned long " fd ", unsigned long " pgoffset );
+.BI "void *syscall(SYS_mmap2, unsigned long " addr ", unsigned long " length ,
+.BI "              unsigned long " prot ", unsigned long " flags ,
+.BI "              unsigned long " fd ", unsigned long " pgoffset );
 .fi
 .SH DESCRIPTION
 This is probably not the system call that you are interested in; instead, see