summaryrefslogtreecommitdiff
path: root/user/protobuf/musl-fix.patch
diff options
context:
space:
mode:
authorDan Theisen <djt@hxx.in>2018-10-05 03:15:07 -0700
committerDan Theisen <djt@hxx.in>2018-10-05 03:15:07 -0700
commit2ba6865311296c8ed0aa7ffde55c12737ef0abf4 (patch)
tree4295cd53dc9d6267ecaed694ae2ca877cfd8e76f /user/protobuf/musl-fix.patch
parent1b0bf7092df10ea56033ce9f04a2eb6d6983ad75 (diff)
downloadpackages-2ba6865311296c8ed0aa7ffde55c12737ef0abf4.tar.gz
packages-2ba6865311296c8ed0aa7ffde55c12737ef0abf4.tar.bz2
packages-2ba6865311296c8ed0aa7ffde55c12737ef0abf4.tar.xz
packages-2ba6865311296c8ed0aa7ffde55c12737ef0abf4.zip
user/protobuf: new package from alpine, ugh
Diffstat (limited to 'user/protobuf/musl-fix.patch')
-rw-r--r--user/protobuf/musl-fix.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/user/protobuf/musl-fix.patch b/user/protobuf/musl-fix.patch
new file mode 100644
index 000000000..442ca20ed
--- /dev/null
+++ b/user/protobuf/musl-fix.patch
@@ -0,0 +1,22 @@
+seems like both musl libc and android has byteswap.h
+
+--- a/src/google/protobuf/stubs/port.h
++++ b/src/google/protobuf/stubs/port.h
+@@ -94,7 +94,7 @@
+ #include <intrin.h>
+ #elif defined(__APPLE__)
+ #include <libkern/OSByteOrder.h>
+-#elif defined(__GLIBC__) || defined(__BIONIC__) || defined(__CYGWIN__)
++#elif defined(__linux__) || defined(__BIONIC__) || defined(__CYGWIN__)
+ #include <byteswap.h> // IWYU pragma: export
+ #endif
+
+@@ -380,7 +380,7 @@ inline void GOOGLE_UNALIGNED_STORE64(voi
+ #define bswap_32(x) OSSwapInt32(x)
+ #define bswap_64(x) OSSwapInt64(x)
+
+-#elif !defined(__GLIBC__) && !defined(__BIONIC__) && !defined(__CYGWIN__)
++#elif !defined(__linux__) && !defined(__BIONIC__) && !defined(__CYGWIN__)
+
+ static inline uint16 bswap_16(uint16 x) {
+ return static_cast<uint16>(((x & 0xFF) << 8) | ((x & 0xFF00) >> 8));