diff --git a/patches/protobuf-v22.2.patch b/patches/protobuf-v22.2.patch index 235602aa37..a2401ca6b3 100644 --- a/patches/protobuf-v22.2.patch +++ b/patches/protobuf-v22.2.patch @@ -69,6 +69,22 @@ index 2e38c1bac..0c26a97f4 100644 ${protobuf_BINARY_DIR} ${protobuf_SOURCE_DIR}/src) +diff --git a/build_defs/cpp_opts.bzl b/build_defs/cpp_opts.bzl +index f95c3e257..5a32371da 100644 +--- a/build_defs/cpp_opts.bzl ++++ b/build_defs/cpp_opts.bzl +@@ -36,6 +36,11 @@ LINK_OPTS = select({ + # Suppress linker warnings about files with no symbols defined. + "-ignore:4221", + ], ++ "@platforms//os:macos": [ ++ "-lpthread", ++ "-lm", ++ "-framework CoreFoundation", ++ ], + "//conditions:default": [ + "-lpthread", + "-lm", diff --git a/src/google/protobuf/port.h b/src/google/protobuf/port.h index 9ca45d966..6bbf1d164 100644 --- a/src/google/protobuf/port.h