--- linux/include/linux/device-mapper.h	Thu Nov  1 12:25:55 2001
+++ linux-dm/include/linux/device-mapper.h	Thu Nov  1 11:46:57 2001
@@ -8,12 +8,14 @@
 #define DEVICE_MAPPER_H
 
 #include <linux/major.h>
+#include <linux/fs.h>
 
 /* FIXME: Use value from local range for now, for co-existence with LVM 1 */
 #define DM_BLK_MAJOR 124
 #define DM_NAME_LEN 64
 #define DM_MAX_TYPE_NAME 16
 
+#ifdef __KERNEL__
 
 struct dm_table;
 struct dm_dev;
@@ -56,5 +58,7 @@
 
 int dm_register_target(struct target_type *t);
 int dm_unregister_target(struct target_type *t);
+
+#endif /* __KERNEL__ */
 
 #endif /* DEVICE_MAPPER_H */
--- linux/include/linux/dm-ioctl.h	Thu Nov  1 12:25:55 2001
+++ linux-dm/include/linux/dm-ioctl.h	Thu Nov  1 11:51:36 2001
@@ -7,9 +7,6 @@
 #ifndef _DM_IOCTL_H
 #define _DM_IOCTL_H
 
-// FIXME: just for now to steal LVM_CHR_MAJOR
-#include <linux/lvm.h>
-
 #include "device-mapper.h"
 
 /*
@@ -19,12 +16,12 @@
 
 struct dm_target_spec {
 	int32_t status;		/* used when reading from kernel only */
-	uint64_t sector_start;
-	uint64_t length;
+	unsigned long long sector_start;
+	unsigned long long length;
 
 	char target_type[DM_MAX_TYPE_NAME];
 
-	uint32_t next;		/* offset in bytes to next target_spec */
+	unsigned long next;	/* offset in bytes to next target_spec */
 
 	/*
 	 * Parameter string starts immediately
@@ -35,7 +32,7 @@
 };
 
 struct dm_ioctl {
-	uint32_t data_size;	/* the size of this structure */
+	unsigned long data_size;	/* the size of this structure */
 	char name[DM_NAME_LEN];
 	int suspend;
 	int open_count;		/* out field */
@@ -44,9 +41,9 @@
 	int target_count;
 };
 
-/* FIXME: find own # */
+/* FIXME: find own numbers, 109 is pinched from LVM */
 #define DM_IOCTL 0xfd
-#define DM_CHAR_MAJOR LVM_CHAR_MAJOR
+#define DM_CHAR_MAJOR 109
 
 #define	DM_CREATE _IOW(DM_IOCTL, 0x00, struct dm_ioctl)
 #define	DM_REMOVE _IOW(DM_IOCTL, 0x01, struct dm_ioctl)
