summaryrefslogtreecommitdiffstats
path: root/sys-utils
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
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')
-rw-r--r--sys-utils/swapoff.c3
-rw-r--r--sys-utils/swapon.c3
2 files changed, 2 insertions, 4 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
diff --git a/sys-utils/swapon.c b/sys-utils/swapon.c
index 6bf67a91f..13437f771 100644
--- a/sys-utils/swapon.c
+++ b/sys-utils/swapon.c
@@ -59,8 +59,7 @@
# define SWAP_FLAG_PRIO_SHIFT 0
#endif
-#ifndef SWAPON_HAS_TWO_ARGS
-/* libc is insane, let's call the kernel */
+#if !defined(HAVE_SWAPON) && defined(SYS_swapon)
# include <sys/syscall.h>
# define swapon(path, flags) syscall(SYS_swapon, path, flags)
#endif