From 0b085deb66af320cee4046d5f5a89dfb044a2811 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Tue, 7 Jul 2026 20:34:43 -0400 Subject: [PATCH] Hack fix for linux build --- common/protobuf-3.2.0/src/google/protobuf/stubs/port.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/common/protobuf-3.2.0/src/google/protobuf/stubs/port.h b/common/protobuf-3.2.0/src/google/protobuf/stubs/port.h index d37e8130..21dd3e11 100644 --- a/common/protobuf-3.2.0/src/google/protobuf/stubs/port.h +++ b/common/protobuf-3.2.0/src/google/protobuf/stubs/port.h @@ -91,6 +91,14 @@ #include // NOLINT(build/include) #elif defined(__APPLE__) #include +#elif defined(__GNUC__) +// Use compiler intrinsics rather than to avoid issue with include +// path having public/tier1/byteswap.h ahead of the system header, with that +// not having bswap_* and dragging in tier0/basetypes.h with its "schema" macro +// that then clashes with a parameter named "schema" another protobuf header +#define bswap_16(x) __builtin_bswap16(x) +#define bswap_32(x) __builtin_bswap32(x) +#define bswap_64(x) __builtin_bswap64(x) #elif defined(__GLIBC__) || defined(__CYGWIN__) #include // IWYU pragma: export #endif