aboutsummaryrefslogtreecommitdiff
path: root/toys/mkswap.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2012-03-08 20:14:55 -0600
committerRob Landley <rob@landley.net>2012-03-08 20:14:55 -0600
commitb7529b608ea3e56784c7682b382f285008a2fc90 (patch)
tree95f47b19499f5df2bc78f303a63588da4ce43ce4 /toys/mkswap.c
parent13cacbd09de09e38e4d1227f7122fda8f1d6fc63 (diff)
downloadtoybox-b7529b608ea3e56784c7682b382f285008a2fc90.tar.gz
More stabs at getting #includes right, and moving off of deprecated functions.
Diffstat (limited to 'toys/mkswap.c')
-rw-r--r--toys/mkswap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/mkswap.c b/toys/mkswap.c
index 43fb6bfb..87c1550f 100644
--- a/toys/mkswap.c
+++ b/toys/mkswap.c
@@ -21,7 +21,7 @@ config MKSWAP
void mkswap_main(void)
{
- int fd = xopen(*toys.optargs, O_RDWR), pagesize = getpagesize();
+ int fd = xopen(*toys.optargs, O_RDWR), pagesize = sysconf(_SC_PAGE_SIZE);
off_t len = fdlength(fd);
unsigned int pages = (len/pagesize)-1, *swap = (unsigned int *)toybuf;