From f29cde56e9291befedd71cd847889472ac9a2b9b Mon Sep 17 00:00:00 2001 From: Ethan Sommer Date: Tue, 26 May 2020 16:03:59 -0400 Subject: devmem: replace getpagesize with POSIX sysconf(_SC_PAGESIZE) --- toys/other/devmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/other') diff --git a/toys/other/devmem.c b/toys/other/devmem.c index 6e270df0..ced6c518 100644 --- a/toys/other/devmem.c +++ b/toys/other/devmem.c @@ -20,7 +20,7 @@ config DEVMEM void devmem_main(void) { - int writing = toys.optc == 3, page_size = getpagesize(), bytes = 4, fd; + int writing = toys.optc == 3, page_size = sysconf(_SC_PAGESIZE), bytes = 4,fd; unsigned long long addr = atolx(toys.optargs[0]), data = 0, map_off, map_len; void *map, *p; -- cgit v1.2.3