summaryrefslogtreecommitdiffstats
path: root/sys-utils/swapoff.c
diff options
context:
space:
mode:
authorKarel Zak2017-12-18 13:57:20 +0100
committerKarel Zak2017-12-18 13:57:20 +0100
commitcf9b16f1d408faa63009667329431f7969303220 (patch)
treec85844bf8c0e40713d49a73534bd8da389b6696f /sys-utils/swapoff.c
parentlibblkid: (bcache) cleanup magic string definition (diff)
downloadkernel-qcow2-util-linux-cf9b16f1d408faa63009667329431f7969303220.tar.gz
kernel-qcow2-util-linux-cf9b16f1d408faa63009667329431f7969303220.tar.xz
kernel-qcow2-util-linux-cf9b16f1d408faa63009667329431f7969303220.zip
build-sys: don't check for swapon() number of arguments
The syscall swapon() with two arguments is supported since Linux 1.3.2 and it's really long time ago... Let's assume that all libc header files have been already fixed. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'sys-utils/swapoff.c')
-rw-r--r--sys-utils/swapoff.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys-utils/swapoff.c b/sys-utils/swapoff.c
index e5e059d74..0a3807fda 100644
--- a/sys-utils/swapoff.c
+++ b/sys-utils/swapoff.c
@@ -14,8 +14,7 @@
#include "swapprober.h"
#include "swapon-common.h"
-#ifndef SWAPON_HAS_TWO_ARGS
-/* libc is insane, let's call the kernel */
+#if !defined(HAVE_SWAPOFF) && defined(SYS_swapoff)
# include <sys/syscall.h>
# define swapoff(path) syscall(SYS_swapoff, path)
#endif