* Boston, MA 021110-1307, USA.
*/
-#ifndef __KERNCOMPAT
-#define __KERNCOMPAT
+#ifndef __KERNCOMPAT_H__
+#define __KERNCOMPAT_H__
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <linux/types.h>
#include <stdint.h>
+
+#include <features.h>
+
+#ifndef __GLIBC__
+#ifndef BTRFS_DISABLE_BACKTRACE
+#define BTRFS_DISABLE_BACKTRACE
+#endif
+#define __always_inline __inline __attribute__ ((__always_inline__))
+#endif
+
#ifndef BTRFS_DISABLE_BACKTRACE
#include <execinfo.h>
#endif
typedef unsigned char u8;
typedef unsigned short u16;
typedef long long s64;
-typedef int s32
+typedef int s32;
#endif
#define put_unaligned_le32(val,p) (((struct __una_u32 *)(p))->x = cpu_to_le32(val))
#define get_unaligned_le64(p) le64_to_cpu(((const struct __una_u64 *)(p))->x)
#define put_unaligned_le64(val,p) (((struct __una_u64 *)(p))->x = cpu_to_le64(val))
-#endif
#ifndef true
#define true 1
#ifndef noinline
#define noinline
#endif
+
+#endif