GNU/Hurd uses linux-like swapspace, so mkswap makes sense on
non-linux platforms too.
[kzak@redhat.com: split the original patch to small patches]
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
include $(top_srcdir)/config/include-Makefile.am
-utils_common = ../lib/linux_version.c ../lib/blkdev.c
+utils_common = ../lib/blkdev.c
+if LINUX
+utils_common += ../lib/linux_version.c
+endif
dist_man_MANS = blockdev.8 isosize.8 mkfs.8 mkswap.8 \
fsck.minix.8 mkfs.minix.8 mkfs.bfs.8
version = 1;
else
/* use version 1 as default, if possible */
+#ifdef __linux__
if (get_linux_version() < KERNEL_VERSION(2,1,117))
version = 0;
- else if (pagesize < 2048)
+ else
+#endif
+ if (pagesize < 2048)
version = 0;
else
version = 1;
if (version == 0)
maxpages = V0_MAX_PAGES;
+#ifdef __linux__
else if (get_linux_version() >= KERNEL_VERSION(2,3,4))
maxpages = PAGES;
else if (get_linux_version() >= KERNEL_VERSION(2,2,1))
maxpages = V1_MAX_PAGES;
+#endif
else
maxpages = V1_OLD_MAX_PAGES;