--- src/main.c.orig
+++ src/main.c
@@ -20,7 +20,6 @@
 #include <sys/types.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <mcheck.h>
 #include <stdint.h>
 #include <stdarg.h>
 #include <string.h>
--- src/btrfs/rbtree.h.orig
+++ src/btrfs/rbtree.h
@@ -38,6 +38,10 @@
 extern "C" {
 #endif
 
+#ifndef __always_inline
+#define __always_inline         inline __attribute__((always_inline))
+#endif
+
 struct rb_node {
 	unsigned long  __rb_parent_color;
 	struct rb_node *rb_right;
