summarylogtreecommitdiffstats
path: root/002-pointer-cast.patch
diff options
context:
space:
mode:
Diffstat (limited to '002-pointer-cast.patch')
-rw-r--r--002-pointer-cast.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/002-pointer-cast.patch b/002-pointer-cast.patch
new file mode 100644
index 000000000000..4df924ce8b34
--- /dev/null
+++ b/002-pointer-cast.patch
@@ -0,0 +1,13 @@
+--- libtre/lib/tre-internal.h.orig 2015-01-13 23:45:59.325000000 +0300
++++ libtre/lib/tre-internal.h 2015-01-14 00:12:06.954200000 +0300
+@@ -127,8 +127,8 @@
+ /* Returns number of bytes to add to (char *)ptr to make it
+ properly aligned for the type. */
+ #define ALIGN(ptr, type) \
+- ((((long)ptr) % sizeof(type)) \
+- ? (sizeof(type) - (((long)ptr) % sizeof(type))) \
++ ((((intptr_t)ptr) % sizeof(type)) \
++ ? (sizeof(type) - (((intptr_t)ptr) % sizeof(type))) \
+ : 0)
+
+ #undef MAX