Преглед на файлове

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>