--- include/freebsd.h.orig Mon Jan 16 22:46:48 2006 +++ include/freebsd.h Fri May 26 18:40:16 2006 @@ -27,7 +27,14 @@ #include #include -#include +#include +#define __BYTE_ORDER BYTE_ORDER +#define __LITTLE_ENDIAN LITTLE_ENDIAN +#define __BIG_ENDIAN BIG_ENDIAN + +#define __swab16 bswap16 +#define __swab32 bswap16 +#define __swab64 bswap16 /* FreeBSD file API is 64-bit aware */ #define fstat64 fstat @@ -39,15 +46,6 @@ #define fdatasync fsync #define memalign(a,size) valloc(size) -typedef u_int8_t __u8; -typedef int8_t __s8; -typedef u_int16_t __u16; -typedef int16_t __s16; -typedef u_int32_t __u32; -typedef int32_t __s32; -typedef u_int64_t __u64; -typedef int64_t __s64; - #define constpp char * const * #define EFSCORRUPTED 990 /* Filesystem is corrupted */ @@ -84,7 +82,7 @@ struct statfs buf; if (fstatfs(fd, &buf) < 0) return 0; - return strcpy(buf.f_fstypename, "xfs") == 0; + return strncmp(buf.f_fstypename, "xfs", 4) == 0; } static __inline__ int platform_test_xfs_path(const char *path) @@ -92,7 +90,7 @@ struct statfs buf; if (statfs(path, &buf) < 0) return 0; - return strcpy(buf.f_fstypename, "xfs") == 0; + return strncmp(buf.f_fstypename, "xfs", 4) == 0; } static __inline__ int platform_fstatfs(int fd, struct statfs *buf)