aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Sommer <e5ten.arch@gmail.com>2020-05-26 16:03:59 -0400
committerRob Landley <rob@landley.net>2020-05-27 01:16:11 -0500
commitf29cde56e9291befedd71cd847889472ac9a2b9b (patch)
tree6337c0adb2c414371821a3ca9fcd5f20241e0dba
parent52fa7bf4fca2afe8853225d674b8ac7e036b315f (diff)
downloadtoybox-f29cde56e9291befedd71cd847889472ac9a2b9b.tar.gz
devmem: replace getpagesize with POSIX sysconf(_SC_PAGESIZE)
-rw-r--r--toys/other/devmem.c2
1 files changed, 1 insertions, 1 deletions
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;