Merge "libbinder: Don\'t redefine B_PACK_CHARS" am: 7166e7823c am: a1474da3b5
am: 22a496cabd
* commit '22a496cabd1e6d36dbf8a5acb3c57f39335148ca':
libbinder: Don't redefine B_PACK_CHARS
diff --git a/include/hwbinder/IBinder.h b/include/hwbinder/IBinder.h
index 97f1fc2..7175ef6 100644
--- a/include/hwbinder/IBinder.h
+++ b/include/hwbinder/IBinder.h
@@ -17,14 +17,17 @@
#ifndef ANDROID_IBINDER_H
#define ANDROID_IBINDER_H
+#include <cstdlib> // Defines types needed for linux/binder.h
+#include <linux/binder.h> // Needed for B_PACK_CHARS
+
#include <utils/Errors.h>
#include <utils/RefBase.h>
#include <utils/String16.h>
#include <utils/Vector.h>
-
-#define B_PACK_CHARS(c1, c2, c3, c4) \
- ((((c1)<<24)) | (((c2)<<16)) | (((c3)<<8)) | (c4))
+#ifndef B_PACK_CHARS
+#error "linux/binder.h no longer defines B_PACK_CHARS"
+#endif
// ---------------------------------------------------------------------------
namespace android {