aboutsummaryrefslogtreecommitdiffstats
path: root/main/btrfs-progs/includes.patch
blob: a0b2c1aae957493dd85b3a10af3afe36baf9c886 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
diff --git a/bitops.h b/bitops.h
index 323c571..7f30b06 100644
--- a/kernel-lib/bitops.h
+++ b/kernel-lib/bitops.h
@@ -65,6 +65,9 @@ static inline unsigned long hweight_long(unsigned long w)
 }
 
 #define BITOP_WORD(nr)		((nr) / BITS_PER_LONG)
+#ifndef __always_inline
+#define __always_inline         inline __attribute__((always_inline))
+#endif
 
 /**
  * __ffs - find first bit in word.
diff --git a/kerncompat.h.orig b/kerncompat.h
index bb03194e127e..28f832a2e625 100644
--- a/kerncompat.h
+++ b/kerncompat.h
@@ -28,6 +28,7 @@
 #include <assert.h>
 #include <stddef.h>
 #include <linux/types.h>
+#include <linux/limits.h>
 #include <stdint.h>
 
 #define ptr_to_u64(x)	((u64)(uintptr_t)x)
--- a/kernel-lib/rbtree.h
+++ b/kernel-lib/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;
--- a/convert/source-fs.h
+++ b/convert/source-fs.h
@@ -20,6 +20,7 @@
 #include "kerncompat.h"
 #include <linux/kdev_t.h>
 #include <pthread.h>
+#include <sys/types.h>
 
 #define CONV_IMAGE_SUBVOL_OBJECTID BTRFS_FIRST_FREE_OBJECTID