audiofile: fix constexpr build failure on macOS 15/SDK 26

This commit is contained in:
Slawek Bunka
2025-12-08 13:11:26 +01:00
committed by Renee Otten
parent 56ef58eed4
commit d0ff8b63c2
2 changed files with 15 additions and 0 deletions
+2
View File
@@ -27,8 +27,10 @@ depends_build port:pkgconfig
depends_lib port:flac
patchfiles search-werror.patch
patchfiles-append simplemodule-constexpr.patch
patch.pre_args-replace -p0 -p1
use_autoreconf yes
autoreconf.args -fvi
@@ -0,0 +1,13 @@
--- audiofile-0.3.6.orig/libaudiofile/modules/SimpleModule.h 2025-12-08 12:43:45
+++ audiofile-0.3.6/libaudiofile/modules/SimpleModule.h 2025-12-08 12:53:06
@@ -122,8 +122,8 @@ struct signConverter
typedef typename IntTypes<Format>::SignedType SignedType;
typedef typename IntTypes<Format>::UnsignedType UnsignedType;
- static const int kScaleBits = (Format + 1) * CHAR_BIT - 1;
- static const int kMinSignedValue = -1 << kScaleBits;
+ static constexpr int kScaleBits = (Format + 1) * CHAR_BIT - 1;
+ static constexpr int kMinSignedValue = static_cast<int>(-(1LL << kScaleBits));
struct signedToUnsigned : public std::unary_function<SignedType, UnsignedType>
{