From 623093bf51d276d2227f931a7680fa025d94e191 Mon Sep 17 00:00:00 2001 From: Enno Boland Date: Sun, 1 Jul 2018 12:51:34 +0200 Subject: [PATCH] protobuf: import alpine patch musl provides byteswap.h (and so does android apparently). so we assume its there if we are on linux. --- srcpkgs/protobuf/patches/musl-fix.patch | 22 ++++++++++++++++++++++ srcpkgs/protobuf/template | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) 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 0000000000..09343ed071 --- /dev/null +++ b/srcpkgs/protobuf/patches/musl-fix.patch @@ -0,0 +1,22 @@ +seems like both musl libc and android has byteswap.h + +--- ./src/google/protobuf/stubs/port.h.orig 2018-07-01 12:46:31.204740205 +0200 ++++ ./src/google/protobuf/stubs/port.h 2018-07-01 12:46:00.245986923 +0200 +@@ -94,7 +94,7 @@ + #include + #elif defined(__APPLE__) + #include +-#elif defined(__GLIBC__) || defined(__BIONIC__) || defined(__CYGWIN__) ++#elif defined(__linux__) || defined(__BIONIC__) || defined(__CYGWIN__) + #include // 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(((x & 0xFF) << 8) | ((x & 0xFF00) >> 8)); diff --git a/srcpkgs/protobuf/template b/srcpkgs/protobuf/template index 697d0c2521..e46a9f7c3d 100644 --- a/srcpkgs/protobuf/template +++ b/srcpkgs/protobuf/template @@ -1,7 +1,7 @@ # Template file for 'protobuf' pkgname=protobuf version=3.6.0.1 -revision=1 +revision=2 build_style=gnu-configure hostmakedepends="automake libtool pkg-config" makedepends="zlib-devel"