aboutsummaryrefslogtreecommitdiff
path: root/util-linux/swaponoff.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-04-05 03:14:39 +0000
committerEric Andersen <andersen@codepoet.org>2001-04-05 03:14:39 +0000
commite76c3b08e105147e3cef7e8d38d65da2fac6b2e1 (patch)
tree87f705b9e4e4e48700ac61e9538c637ae2b395a7 /util-linux/swaponoff.c
parent3c0364f3911ec9f43e1c8c96ec2c8e30b1b52c47 (diff)
downloadbusybox-w32-e76c3b08e105147e3cef7e8d38d65da2fac6b2e1.tar.gz
busybox-w32-e76c3b08e105147e3cef7e8d38d65da2fac6b2e1.tar.bz2
busybox-w32-e76c3b08e105147e3cef7e8d38d65da2fac6b2e1.zip
A number of cleanups. Now compiles with libc5, glibc, and uClibc. Fix a few
shadowed variables. Move (almost) all syscalls to libbb/syscalls.c, so I can handle them sanely and all at once. -Erik
Diffstat (limited to '')
-rw-r--r--util-linux/swaponoff.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index 55022ae3b..ce0e2c6cc 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -29,13 +29,16 @@
29#include <string.h> 29#include <string.h>
30#include <stdlib.h> 30#include <stdlib.h>
31#include <sys/mount.h> 31#include <sys/mount.h>
32#include <sys/syscall.h>
33#include <linux/unistd.h>
34#include "busybox.h"
35 32
36static _syscall2(int, swapon, const char *, path, int, flags); 33#if __GNU_LIBRARY__ < 5
37static _syscall1(int, swapoff, const char *, path); 34/* libc5 doesn't have sys/swap.h, define these here. */
35extern int swapon (__const char *__path, int __flags);
36extern int swapoff (__const char *__path);
37#else
38#include <sys/swap.h>
39#endif
38 40
41#include "busybox.h"
39 42
40static int whichApp; 43static int whichApp;
41 44