From dc89f84c384355362a002a3c43a567c0b8317a45 Mon Sep 17 00:00:00 2001 From: Michael Gehring Date: Thu, 4 May 2017 07:59:34 +0000 Subject: [PATCH] protobuf: actually add the patch... --- srcpkgs/protobuf/patches/musl-fix.patch | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 srcpkgs/protobuf/patches/musl-fix.patch diff --git a/srcpkgs/protobuf/patches/musl-fix.patch b/srcpkgs/protobuf/patches/musl-fix.patch new file mode 100644 index 00000000000..5c3b88b7c23 --- /dev/null +++ b/srcpkgs/protobuf/patches/musl-fix.patch @@ -0,0 +1,24 @@ +seems like both musl libc and android has byteswap.h + +diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h +index 376be5f..21223f4 100644 +--- src/google/protobuf/stubs/port.h ++++ src/google/protobuf/stubs/port.h +@@ -87,7 +87,7 @@ + #include // NOLINT(build/include) + #elif defined(__APPLE__) + #include +-#elif defined(__GLIBC__) || defined(__CYGWIN__) ++#elif defined(__linux__) || defined(__CYGWIN__) + #include // IWYU pragma: export + #endif + +@@ -299,7 +299,7 @@ inline void GOOGLE_UNALIGNED_STORE64(void *p, uint64 v) { + #define bswap_32(x) OSSwapInt32(x) + #define bswap_64(x) OSSwapInt64(x) + +-#elif !defined(__GLIBC__) && !defined(__CYGWIN__) ++#elif !defined(__linux__) && !defined(__CYGWIN__) + + static inline uint16 bswap_16(uint16 x) { + return static_cast(((x & 0xFF) << 8) | ((x & 0xFF00) >> 8));