瀏覽代碼

adding a special-case of endiannes for android, #507

Stasik0 9 年之前
父節點
當前提交
bd375fb5b2
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      include/ua_config.h.in

+ 6 - 1
include/ua_config.h.in

@@ -55,7 +55,12 @@
 # define le32toh(x) (x)
 # define le64toh(x) (x)
 #else
-# if defined(__linux__)
+# if defined(__ANDROID__)
+#  include <endian.h>
+#  define le16toh(x) letoh16(x)
+#  define le32toh(x) letoh32(x)
+#  define le64toh(x) letoh64(x)
+# elif defined(__linux__)
 #  include <endian.h>
 # elif defined(__OpenBSD__)
 #  include <sys/endian.h>