diff --git a/csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs b/csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs deleted file mode 100644 index 208ce1fcb6319..0000000000000 --- a/csharp/src/Google.Protobuf/Reflection/FeatureSetDescriptor.g.cs +++ /dev/null @@ -1,17 +0,0 @@ -#region Copyright notice and license -// Protocol Buffers - Google's data interchange format -// Copyright 2008 Google Inc. All rights reserved. -// -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file or at -// https://developers.google.com/open-source/licenses/bsd -#endregion - -namespace Google.Protobuf.Reflection; - -internal sealed partial class FeatureSetDescriptor -{ - // Canonical serialized form of the edition defaults, generated by embed_edition_defaults. - private const string DefaultsBase64 = - "ChMYhAciACoMCAEQAhgCIAMoATACChMY5wciACoMCAIQARgBIAIoATABChMY6AciDAgBEAEYASACKAEwASoAIOYHKOgH"; -} diff --git a/src/google/protobuf/map.h b/src/google/protobuf/map.h index 1f02abd21e776..3d65e7ca646a1 100644 --- a/src/google/protobuf/map.h +++ b/src/google/protobuf/map.h @@ -31,7 +31,8 @@ #include "absl/memory/memory.h" #include "google/protobuf/message_lite.h" -#if !defined(GOOGLE_PROTOBUF_NO_RDTSC) && defined(__APPLE__) +#if !defined(GOOGLE_PROTOBUF_NO_RDTSC) && defined(__APPLE__) && \ + (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) #include #endif @@ -728,9 +729,10 @@ class PROTOBUF_EXPORT UntypedMapBase { map_index_t Seed() const { uint64_t s = 0; #if !defined(GOOGLE_PROTOBUF_NO_RDTSC) -#if defined(__APPLE__) +#if defined(__APPLE__) && \ + (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) // Use a commpage-based fast time function on Apple environments (MacOS, - // iOS, tvOS, watchOS, etc). + // iOS, tvOS, watchOS, etc), if we think the system headers expose it. s = clock_gettime_nsec_np(CLOCK_UPTIME_RAW); #elif defined(__x86_64__) && defined(__GNUC__) uint32_t hi, lo;