tools/nolibc: fix return type of getpagesize()

It's documented as returning int which is also implemented by glibc and
musl, so adopt that return type.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
This commit is contained in:
Thomas Weißschuh 2023-08-03 09:28:46 +02:00 committed by Willy Tarreau
parent f2f5eaefa1
commit 6407750225
2 changed files with 3 additions and 3 deletions

View File

@ -460,11 +460,11 @@ pid_t gettid(void)
static unsigned long getauxval(unsigned long key);
/*
* long getpagesize(void);
* int getpagesize(void);
*/
static __attribute__((unused))
long getpagesize(void)
int getpagesize(void)
{
return __sysret(getauxval(AT_PAGESZ) ?: -ENOENT);
}

View File

@ -636,7 +636,7 @@ int test_getdents64(const char *dir)
static int test_getpagesize(void)
{
long x = getpagesize();
int x = getpagesize();
int c;
if (x < 0)