Skip to content

Commit

Permalink
Use byteswap.h when building against musl libc (#8503)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgthegreat committed Apr 19, 2021
1 parent 0f25590 commit e6db597
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 118 deletions.
59 changes: 0 additions & 59 deletions python/google/protobuf/internal/python_protobuf.cc

This file was deleted.

57 changes: 0 additions & 57 deletions python/google/protobuf/python_protobuf.h

This file was deleted.

4 changes: 2 additions & 2 deletions src/google/protobuf/stubs/port.h
Expand Up @@ -78,7 +78,7 @@
#include <intrin.h>
#elif defined(__APPLE__)
#include <libkern/OSByteOrder.h>
#elif defined(__GLIBC__) || defined(__BIONIC__) || defined(__CYGWIN__)
#elif defined(__linux__) || defined(__ANDROID__) || defined(__CYGWIN__)
#include <byteswap.h> // IWYU pragma: export
#endif

Expand Down Expand Up @@ -242,7 +242,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(__BIONIC__) && !defined(__CYGWIN__)
#elif !defined(__linux__) && !defined(__ANDROID__) && !defined(__CYGWIN__)

#ifndef bswap_16
static inline uint16 bswap_16(uint16 x) {
Expand Down

0 comments on commit e6db597

Please sign in to comment.