utils_common = sundries.c xmalloc.c realpath.c fsprobe.c
-headers_common = fstab.h linux_fs.h mount_mntent.h mount_constants.h my_dev_t.h \
+headers_common = fstab.h linux_fs.h mount_mntent.h mount_constants.h \
mount_paths.h lomount.h fsprobe.h realpath.h xmalloc.h \
getusername.h loop.h sundries.h
+#ifndef MNT_LOOP_H
+#define MNT_LOOP_H
+
+#include <linux/posix_types.h>
+#include "linux_version.h"
+
+#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
+
#define LO_CRYPT_NONE 0
#define LO_CRYPT_XOR 1
#define LO_CRYPT_DES 2
#define LO_NAME_SIZE 64
#define LO_KEY_SIZE 32
-#include "my_dev_t.h"
-
struct loop_info {
int lo_number;
my_dev_t lo_device;
unsigned char lo_encrypt_key[LO_KEY_SIZE];
unsigned long long lo_init[2];
};
+
+#endif /* MNT_LOOP_H */
+++ /dev/null
-/* silliness to get dev_t defined as the kernel defines it */
-/* glibc uses a different dev_t */
-
-#include <linux/posix_types.h>
-#include <linux/version.h>
-
-#ifndef KERNEL_VERSION
-#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
-#endif
-
-#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