util-linux/util-linux-2.13-swap-page.patch
2006-06-12 16:04:59 +00:00

69 lines
1.9 KiB
Diff

--- util-linux-2.13-pre6/disk-utils/mkswap.c.page 2006-06-12 17:30:57.000000000 +0200
+++ util-linux-2.13-pre6/disk-utils/mkswap.c 2006-06-12 17:30:31.000000000 +0200
@@ -53,17 +53,6 @@
#include <uuid/uuid.h>
#endif
-/* Try to get PAGE_SIZE from libc or kernel includes */
-#ifdef HAVE_SYS_USER_H
- /* Note: <sys/user.h> says: for gdb only */
-#include <sys/user.h> /* for PAGE_SIZE and PAGE_SHIFT */
-#else
-#ifdef HAVE_ASM_PAGE_H
-#include <asm/page.h> /* for PAGE_SIZE and PAGE_SHIFT */
- /* we also get PAGE_SIZE via getpagesize() */
-#endif
-#endif
-
#ifndef _IO
/* pre-1.3.45 */
#define BLKGETSIZE 0x1260
@@ -172,10 +161,6 @@
static void
init_signature_page(void) {
-
-#ifdef PAGE_SIZE
- defined_pagesize = PAGE_SIZE;
-#endif
kernel_pagesize = getpagesize();
pagesize = kernel_pagesize;
--- util-linux-2.13-pre6/configure.ac.page 2006-06-12 17:28:51.000000000 +0200
+++ util-linux-2.13-pre6/configure.ac 2006-06-12 17:28:28.000000000 +0200
@@ -26,7 +26,8 @@
])
AC_CHECK_HEADERS(langinfo.h)
AC_CHECK_HEADERS(sys/user.h)
-AC_CHECK_HEADERS(asm/page.h)
+# Suck ...
+#AC_CHECK_HEADERS(asm/page.h)
AC_CHECK_HEADERS(rpcsvc/nfs_prot.h)
AC_CHECK_HEADERS(sys/io.h)
AC_CHECK_HEADERS(pty.h)
--- util-linux-2.13-pre6/mount/swap.configure.page 2006-06-12 17:23:27.000000000 +0200
+++ util-linux-2.13-pre6/mount/swap.configure 2006-06-12 17:25:28.000000000 +0200
@@ -3,7 +3,7 @@
# Prepare test
CC=${CC-cc}
-compile="$CC -o conftest conftest.c >/dev/null 2>&1"
+compile="$CC -o conftest conftest.c"
rm -f conftest conftest.c swapargs.h
# What include files shall we try?
@@ -14,9 +14,10 @@
PAGEH=
if [ -f /usr/include/sys/swap.h ]; then
SWAPH="#include <sys/swap.h>"
- if [ -f /usr/include/asm/page.h ]; then
- PAGEH="#include <asm/page.h>"
- fi
+ # Suck ...
+ #if [ -f /usr/include/asm/page.h ]; then
+ # PAGEH="#include <asm/page.h>"
+ #fi
fi
echo $PAGEH > conftest.c
echo $SWAPH >> conftest.c