From: Michael Froman <mfroman@mozilla.com>
Date: Tue, 16 Sep 2025 13:25:00 -0500
Subject: Bug 1985396 - (fix-de2bbb38ff) fixes for c++20 support

Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/c9abd1df5df5d229e2ef8878ee7593363cdb385b
---
 common_audio/resampler/sinc_resampler.cc | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/common_audio/resampler/sinc_resampler.cc b/common_audio/resampler/sinc_resampler.cc
index fc64ba6f1d..22d984a0c6 100644
--- a/common_audio/resampler/sinc_resampler.cc
+++ b/common_audio/resampler/sinc_resampler.cc
@@ -88,7 +88,6 @@
 #include <cstdint>
 #include <cstring>
 #include <limits>
-#include <numbers>
 
 #include "rtc_base/checks.h"
 #include "rtc_base/cpu_info.h"
@@ -208,16 +207,14 @@ void SincResampler::InitializeKernel() {
     for (size_t i = 0; i < kKernelSize; ++i) {
       const size_t idx = i + offset_idx * kKernelSize;
       const float pre_sinc = static_cast<float>(
-          std::numbers::pi *
-          (static_cast<int>(i) - static_cast<int>(kKernelSize / 2) -
-           subsample_offset));
+          M_PI * (static_cast<int>(i) - static_cast<int>(kKernelSize / 2) -
+                  subsample_offset));
       kernel_pre_sinc_storage_[idx] = pre_sinc;
 
       // Compute Blackman window, matching the offset of the sinc().
       const float x = (i - subsample_offset) / kKernelSize;
-      const float window =
-          static_cast<float>(kA0 - kA1 * cos(2.0 * std::numbers::pi * x) +
-                             kA2 * cos(4.0 * std::numbers::pi * x));
+      const float window = static_cast<float>(kA0 - kA1 * cos(2.0 * M_PI * x) +
+                                              kA2 * cos(4.0 * M_PI * x));
       kernel_window_storage_[idx] = window;
 
       // Compute the sinc with offset, then window the sinc() function and store
