summaryrefslogtreecommitdiffstats
path: root/mount/swapon.c
diff options
context:
space:
mode:
authorStepan Kasal2007-05-15 20:46:13 +0200
committerKarel Zak2007-05-16 11:43:30 +0200
commit67c4ade809dc8859dbe9f3511b8968d153ac6b6f (patch)
tree2f2135795a88b2f9092eb61f0c4c04eae5b763c8 /mount/swapon.c
parentbuild-sys: use dist_noinst_DATA to work around the bug with dist_man_MANS (diff)
downloadkernel-qcow2-util-linux-67c4ade809dc8859dbe9f3511b8968d153ac6b6f.tar.gz
kernel-qcow2-util-linux-67c4ade809dc8859dbe9f3511b8968d153ac6b6f.tar.xz
kernel-qcow2-util-linux-67c4ade809dc8859dbe9f3511b8968d153ac6b6f.zip
swapon: simplify an #if
Replace two immerced #ifdef's by an #if with a compound conditional. Signed-off-by: Stepan Kasal <skasal@redhat.com>
Diffstat (limited to 'mount/swapon.c')
-rw-r--r--mount/swapon.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/mount/swapon.c b/mount/swapon.c
index b6bcd750f..7337e32cb 100644
--- a/mount/swapon.c
+++ b/mount/swapon.c
@@ -75,11 +75,7 @@ swapoff_usage(FILE *fp, int n) {
#define SWAPON_NEEDS_TWO_ARGS
#endif
-#ifdef SWAPON_NEEDS_TWO_ARGS
-#ifdef SWAPON_HAS_TWO_ARGS
-/* libc is OK */
-#include <unistd.h>
-#else
+#if defined(SWAPON_NEEDS_TWO_ARGS) && !defined(SWAPON_HAS_TWO_ARGS)
/* We want a swapon with two args, but have an old libc.
Build the kernel call by hand. */
#include <linux/unistd.h>
@@ -87,7 +83,6 @@ static
_syscall2(int, swapon, const char *, path, int, flags);
static
_syscall1(int, swapoff, const char *, path);
-#endif
#else
/* just do as libc says */
#include <unistd.h>