pr1728-fix-ndk-r25.patch 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. From 90a8bda23077508ca208e7afc535da1e2c7d59ae Mon Sep 17 00:00:00 2001
  2. From: Yuriy Chernyshov <thegeorg@yandex-team.com>
  3. Date: Thu, 25 Jul 2024 22:50:40 +0300
  4. Subject: [PATCH 1/3] Workaround broken compilation against NDK r25
  5. ---
  6. absl/time/time.h | 20 ++++++++++----------
  7. 1 file changed, 10 insertions(+), 10 deletions(-)
  8. diff --git a/absl/time/time.h b/absl/time/time.h
  9. index f133c2d2ca8..15edbb4a667 100644
  10. --- a/absl/time/time.h
  11. +++ b/absl/time/time.h
  12. @@ -76,9 +76,9 @@ struct timeval;
  13. #endif
  14. #include <chrono> // NOLINT(build/c++11)
  15. -#ifdef __cpp_impl_three_way_comparison
  16. +#ifdef __cpp_lib_three_way_comparison
  17. #include <compare>
  18. -#endif // __cpp_impl_three_way_comparison
  19. +#endif // __cpp_lib_three_way_comparison
  20. #include <cmath>
  21. #include <cstdint>
  22. @@ -313,12 +313,12 @@ class Duration {
  23. // Relational Operators
  24. -#ifdef __cpp_impl_three_way_comparison
  25. +#ifdef __cpp_lib_three_way_comparison
  26. ABSL_ATTRIBUTE_CONST_FUNCTION constexpr std::strong_ordering operator<=>(
  27. Duration lhs, Duration rhs);
  28. -#endif // __cpp_impl_three_way_comparison
  29. +#endif // __cpp_lib_three_way_comparison
  30. ABSL_ATTRIBUTE_CONST_FUNCTION constexpr bool operator<(Duration lhs,
  31. Duration rhs);
  32. @@ -853,9 +853,9 @@ class Time {
  33. friend constexpr Time time_internal::FromUnixDuration(Duration d);
  34. friend constexpr Duration time_internal::ToUnixDuration(Time t);
  35. -#ifdef __cpp_impl_three_way_comparison
  36. +#ifdef __cpp_lib_three_way_comparison
  37. friend constexpr std::strong_ordering operator<=>(Time lhs, Time rhs);
  38. -#endif // __cpp_impl_three_way_comparison
  39. +#endif // __cpp_lib_three_way_comparison
  40. friend constexpr bool operator<(Time lhs, Time rhs);
  41. friend constexpr bool operator==(Time lhs, Time rhs);
  42. @@ -868,14 +868,14 @@ class Time {
  43. };
  44. // Relational Operators
  45. -#ifdef __cpp_impl_three_way_comparison
  46. +#ifdef __cpp_lib_three_way_comparison
  47. ABSL_ATTRIBUTE_CONST_FUNCTION constexpr std::strong_ordering operator<=>(
  48. Time lhs, Time rhs) {
  49. return lhs.rep_ <=> rhs.rep_;
  50. }
  51. -#endif // __cpp_impl_three_way_comparison
  52. +#endif // __cpp_lib_three_way_comparison
  53. ABSL_ATTRIBUTE_CONST_FUNCTION constexpr bool operator<(Time lhs, Time rhs) {
  54. return lhs.rep_ < rhs.rep_;
  55. @@ -1753,7 +1753,7 @@ ABSL_ATTRIBUTE_CONST_FUNCTION constexpr bool operator<(Duration lhs,
  56. }
  57. -#ifdef __cpp_impl_three_way_comparison
  58. +#ifdef __cpp_lib_three_way_comparison
  59. ABSL_ATTRIBUTE_CONST_FUNCTION constexpr std::strong_ordering operator<=>(
  60. Duration lhs, Duration rhs) {
  61. @@ -1769,7 +1769,7 @@ ABSL_ATTRIBUTE_CONST_FUNCTION constexpr std::strong_ordering operator<=>(
  62. : lhs_lo <=> rhs_lo;
  63. }
  64. -#endif // __cpp_impl_three_way_comparison
  65. +#endif // __cpp_lib_three_way_comparison
  66. ABSL_ATTRIBUTE_CONST_FUNCTION constexpr bool operator==(Duration lhs,
  67. Duration rhs) {