mirror of
https://git.musl-libc.org/git/musl
synced 2025-02-13 08:44:08 +03:00
fix signedness of pgoff argument to remap_file_pages
both the kernel and glibc agree that this argument is unsigned; the incorrect type ssize_t came from erroneous man pages.
This commit is contained in:
parent
3500555db3
commit
74998fbec1
@ -33,7 +33,7 @@ int munlockall (void);
|
|||||||
|
|
||||||
#ifdef _GNU_SOURCE
|
#ifdef _GNU_SOURCE
|
||||||
void *mremap (void *, size_t, size_t, int, ...);
|
void *mremap (void *, size_t, size_t, int, ...);
|
||||||
int remap_file_pages (void *, size_t, int, ssize_t, int);
|
int remap_file_pages (void *, size_t, int, size_t, int);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include "syscall.h"
|
#include "syscall.h"
|
||||||
|
|
||||||
int remap_file_pages(void *addr, size_t size, int prot, ssize_t pgoff, int flags)
|
int remap_file_pages(void *addr, size_t size, int prot, size_t pgoff, int flags)
|
||||||
{
|
{
|
||||||
return syscall(SYS_remap_file_pages, addr, size, prot, pgoff, flags);
|
return syscall(SYS_remap_file_pages, addr, size, prot, pgoff, flags);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user