Browse Source

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

Stasik0 9 years ago
parent
commit
bd375fb5b2
1 changed files with 6 additions and 1 deletions
  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>