--- include/io.h.orig 2002-11-02 11:55:50.000000000 -0600 +++ include/io.h 2002-11-02 14:02:08.000000000 -0600 @@ -3,6 +3,10 @@ */ +#define __KERNEL__ +#include /* needed for test_bit/set_bit */ +#undef __KERNEL__ + struct buffer_head { unsigned long b_blocknr; unsigned short b_dev; --- include/misc.h.orig 2002-11-02 14:17:31.000000000 -0600 +++ include/misc.h 2002-11-02 14:19:44.000000000 -0600 @@ -49,7 +49,10 @@ int uuid_is_correct (unsigned char * uuid); int set_uuid (const unsigned char * text, unsigned char * UUID); +#define __KERNEL__ #include +#undef __KERNEL__ + #if __BYTE_ORDER == __LITTLE_ENDIAN int le_set_bit (int nr, void * addr); int le_clear_bit (int nr, void * addr); @@ -64,12 +67,14 @@ # define le64_to_cpu(val) (val) #elif __BYTE_ORDER == __BIG_ENDIAN +#ifndef cpu_to_le16 # define cpu_to_le16(val) swab16(val) # define le16_to_cpu(val) swab16(val) # define cpu_to_le32(val) swab32(val) # define le32_to_cpu(val) swab32(val) # define cpu_to_le64(val) swab64(val) # define le64_to_cpu(val) swab64(val) +#endif #else # error "nuxi/pdp-endian archs are not supported" #endif