Kaynağa Gözat

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

Stasik0 9 yıl önce
ebeveyn
işleme
bd375fb5b2
1 değiştirilmiş dosya ile 6 ekleme ve 1 silme
  1. 6 1
      include/ua_config.h.in

+ 6 - 1
include/ua_config.h.in

@@ -55,7 +55,12 @@
 # define le32toh(x) (x)
 # define le32toh(x) (x)
 # define le64toh(x) (x)
 # define le64toh(x) (x)
 #else
 #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>
 #  include <endian.h>
 # elif defined(__OpenBSD__)
 # elif defined(__OpenBSD__)
 #  include <sys/endian.h>
 #  include <sys/endian.h>