Commit 64077502 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Willy Tarreau
Browse files

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: default avatarThomas Weißschuh <linux@weissschuh.net>
Signed-off-by: default avatarWilly Tarreau <w@1wt.eu>
parent f2f5eaef
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);
}
+1 −1
Original line number Diff line number Diff line
@@ -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)