summarylogtreecommitdiffstats
path: root/002-pointer-cast.patch
blob: 4df924ce8b3468e607390e12b2456ee2f3dce683 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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