<linux/loop.h>: deal with really ancient Linux kernel headers
authorH. Peter Anvin <hpa@zytor.com>
Mon, 28 Jun 2010 00:09:18 +0000 (17:09 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 28 Jun 2010 00:09:18 +0000 (17:09 -0700)
RHEL4 had a 2.6.9 kernel, but 2.4.20 Linux kernel headers, so put in a
workaround for 2.4 kernel headers.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
libinstaller/linux/loop.h

index 988cfed..90237a3 100644 (file)
@@ -25,6 +25,12 @@ enum {
 
 #include <asm/posix_types.h>   /* for __kernel_old_dev_t */
 #include <linux/types.h>       /* for __u64 */
+#include <linux/version.h>     /* version of Linux kernel headers */
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+/* We have truly ancient Linux kernel headers installed */
+typedef __kernel_dev_t __kernel_old_dev_t;
+#endif
 
 /* Backwards compatibility version */
 struct loop_info {