aboutsummaryrefslogtreecommitdiff
path: root/swaponoff.c
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-04-05 03:14:39 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-04-05 03:14:39 +0000
commit01d0083a639d6b91298c62b9e67b803fe9b9a36d (patch)
tree87f705b9e4e4e48700ac61e9538c637ae2b395a7 /swaponoff.c
parentea8519ec8a9e6807e16ca3a138d22201d35b273b (diff)
downloadbusybox-w32-01d0083a639d6b91298c62b9e67b803fe9b9a36d.tar.gz
busybox-w32-01d0083a639d6b91298c62b9e67b803fe9b9a36d.tar.bz2
busybox-w32-01d0083a639d6b91298c62b9e67b803fe9b9a36d.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 git-svn-id: svn://busybox.net/trunk/busybox@2250 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'swaponoff.c')
-rw-r--r--swaponoff.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/swaponoff.c b/swaponoff.c
index 55022ae3b..ce0e2c6cc 100644
--- a/swaponoff.c
+++ b/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