From 99765cc704b0c8b4230a87aaa66bdce3f8747389 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 11 Sep 2023 22:17:42 +0200 Subject: [PATCH] modplug: add patch to remove the deprecated `register` keyword --- python/build/libs.py | 1 + src/lib/modplug/patches/no_register | 22 ++++++++++++++++++++++ src/lib/modplug/patches/series | 1 + 3 files changed, 24 insertions(+) create mode 100644 src/lib/modplug/patches/no_register create mode 100644 src/lib/modplug/patches/series diff --git a/python/build/libs.py b/python/build/libs.py index c0fae9b9e..74f165bb1 100644 --- a/python/build/libs.py +++ b/python/build/libs.py @@ -120,6 +120,7 @@ libmodplug = AutotoolsProject( [ '--disable-shared', '--enable-static', ], + patches='src/lib/modplug/patches', ) libopenmpt = AutotoolsProject( diff --git a/src/lib/modplug/patches/no_register b/src/lib/modplug/patches/no_register new file mode 100644 index 000000000..e60ae1914 --- /dev/null +++ b/src/lib/modplug/patches/no_register @@ -0,0 +1,22 @@ +Index: libmodplug-0.8.9.0/src/fastmix.cpp +=================================================================== +--- libmodplug-0.8.9.0.orig/src/fastmix.cpp ++++ libmodplug-0.8.9.0/src/fastmix.cpp +@@ -288,7 +288,7 @@ CzWINDOWEDFIR sfir; + // MIXING MACROS + // ---------------------------------------------------------------------------- + #define SNDMIX_BEGINSAMPLELOOP8\ +- register MODCHANNEL * const pChn = pChannel;\ ++ MODCHANNEL * const pChn = pChannel;\ + nPos = pChn->nPosLo;\ + const signed char *p = (signed char *)(pChn->pCurrentSample+pChn->nPos);\ + if (pChn->dwFlags & CHN_STEREO) p += pChn->nPos;\ +@@ -296,7 +296,7 @@ CzWINDOWEDFIR sfir; + do { + + #define SNDMIX_BEGINSAMPLELOOP16\ +- register MODCHANNEL * const pChn = pChannel;\ ++ MODCHANNEL * const pChn = pChannel;\ + nPos = pChn->nPosLo;\ + const signed short *p = (signed short *)(pChn->pCurrentSample+(pChn->nPos*2));\ + if (pChn->dwFlags & CHN_STEREO) p += pChn->nPos;\ diff --git a/src/lib/modplug/patches/series b/src/lib/modplug/patches/series new file mode 100644 index 000000000..4594bd91f --- /dev/null +++ b/src/lib/modplug/patches/series @@ -0,0 +1 @@ +no_register