diff mbox series

mlock.2: mlock2(): Fix prototype parameter types

Message ID 20210204111732.194599-1-alx.manpages@gmail.com
State Not Applicable
Headers show
Series mlock.2: mlock2(): Fix prototype parameter types | expand

Commit Message

Alejandro Colomar \(man-pages\) Feb. 4, 2021, 11:17 a.m. UTC
.../glibc$ grep_syscall_wrapper mlock2
sysdeps/unix/sysv/linux/bits/mman-shared.h:55:
int mlock2 (const void *__addr, size_t __length, unsigned int __flags) __THROW;
.../glibc$

function grep_syscall_wrapper()
{
	if ! [ -v 1 ]; then
		>&2 echo "Usage: ${FUNCNAME[0]} <syscall>";
		return ${EX_USAGE};
	fi

	find * -type f \
	|grep '\.h$' \
	|sort -V \
	|xargs pcregrep -Mn \
	  "(?s)^[^\s#][\w\s]+\s+\**${1}\s*\([\w\s()[\]*,]*?(...)?\)[\w\s()]*;" \
	|sed -E 's/^[^:]+:[0-9]+:/&\n/';
}

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
---
 man2/mlock.2 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/man2/mlock.2 b/man2/mlock.2
index 2822df7cf..f48d632c4 100644
--- a/man2/mlock.2
+++ b/man2/mlock.2
@@ -31,7 +31,7 @@  mlock, mlock2, munlock, mlockall, munlockall \- lock and unlock memory
 .B #include <sys/mman.h>
 .PP
 .BI "int mlock(const void *" addr ", size_t " len );
-.BI "int mlock2(const void *" addr ", size_t " len ", int " flags );
+.BI "int mlock2(const void *" addr ", size_t " len ", unsigned int " flags );
 .BI "int munlock(const void *" addr ", size_t " len );
 .PP
 .BI "int mlockall(int " flags );