Package: util-linux
Version: 2.12r
Author: Guillem Jover <guillem@debian.org>
Status: obsolete
Description:
 Use existing test to conditionally include <sys/user.h> or <asm/page.h>.

--- configure	2004-12-21 00:20:35.000000000 +0200
+++ configure	2006-02-12 10:25:27.000000000 +0200
@@ -11,7 +11,7 @@
 # H3. For kbd_rate.c: does <linux/kd.h> exist?
 # H4. For nls.h: do we have <locale.h>?
 # H5. For cal.c: do we have <langinfo.h>?
-# H6. For mkswap.c: do we have <sys/user.h> or <asm/page.h>?
+# H6. For mkswap.c, fsck.cramfs.c: do we have <sys/user.h> or <asm/page.h>?
 # H6a For mkswap.c: do we have <uuid/uuid.h>?
 # H7. For nfsmount.c: do we have <rpcsvc/nfs_prot.h>?
 # H8. For nfsmount.h (nfsmount_xdr.c: int32_t): do we have <asm/types.h>?
--- disk-utils/fsck.cramfs.c	2004-12-11 16:53:16.000000000 +0200
+++ disk-utils/fsck.cramfs.c	2006-02-12 10:25:27.000000000 +0200
@@ -76,7 +76,14 @@
 
 #define PAD_SIZE 512
 
-#include <asm/page.h>
+#if defined(HAVE_sys_user_h)
+				/* Note: <sys/user.h> says: for gdb only */
+#include <sys/user.h>		/* for PAGE_SIZE and PAGE_SHIFT */
+#elif defined(HAVE_asm_page_h)
+#include <asm/page.h>		/* for PAGE_SIZE and PAGE_SHIFT */
+				/* we also get PAGE_SIZE via getpagesize() */
+#endif
+
 #ifdef PAGE_SIZE
 #define PAGE_CACHE_SIZE ((int) PAGE_SIZE)
 #elif defined __ia64__
