summaryrefslogtreecommitdiffstats
path: root/mount/my_dev_t.h
diff options
context:
space:
mode:
Diffstat (limited to 'mount/my_dev_t.h')
-rw-r--r--mount/my_dev_t.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/mount/my_dev_t.h b/mount/my_dev_t.h
index 5ef97154e..8bb2ea4a5 100644
--- a/mount/my_dev_t.h
+++ b/mount/my_dev_t.h
@@ -1,7 +1,16 @@
/* silliness to get dev_t defined as the kernel defines it */
/* glibc uses a different dev_t */
-/* maybe we need __kernel_old_dev_t -- later */
-/* for ancient systems use "unsigned short" */
#include <linux/posix_types.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(1,3,78)
+/* for i386 - alpha uses unsigned int */
+#define my_dev_t unsigned short
+#else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,68)
#define my_dev_t __kernel_dev_t
+#else
+#define my_dev_t __kernel_old_dev_t
+#endif
+#endif