summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJob Bautista <jobbautista9@protonmail.com>2022-06-30 10:49:38 +0800
committerJob Bautista <jobbautista9@protonmail.com>2022-06-30 10:49:38 +0800
commit2d4950d2ae8cbb8219d97e2e48d02e07bbe1df9e (patch)
tree6a1ec09aa69706c1bb578784a2cc2bf1e2f11288
parent6056469e41cfc551b672450a092c3b1f0031d347 (diff)
downloaduxp-2d4950d2ae8cbb8219d97e2e48d02e07bbe1df9e.tar.gz
Issue #1949 - Part 2: Disable exceptions in soundtouch's STTypes.h.
I don't know how Mozilla was able to build this without defining ST_NO_EXCEPTION_HANDLING, but looks like we have to do it so that the compiler doesn't complain about -fno-exceptions
-rw-r--r--media/libsoundtouch/mcp-disableexceptions.patch13
-rw-r--r--media/libsoundtouch/src/STTypes.h2
-rwxr-xr-xmedia/libsoundtouch/update.sh1
3 files changed, 15 insertions, 1 deletions
diff --git a/media/libsoundtouch/mcp-disableexceptions.patch b/media/libsoundtouch/mcp-disableexceptions.patch
new file mode 100644
index 0000000000..c92d11a86c
--- /dev/null
+++ b/media/libsoundtouch/mcp-disableexceptions.patch
@@ -0,0 +1,13 @@
+diff -u /src/STTypes.h /src/STTypes.h
+--- /src/STTypes.h
++++ /src/STTypes.h
+@@ -174,7 +174,7 @@
+ }
+
+ // define ST_NO_EXCEPTION_HANDLING switch to disable throwing std exceptions:
+-// #define ST_NO_EXCEPTION_HANDLING 1
++#define ST_NO_EXCEPTION_HANDLING 1
+ #ifdef ST_NO_EXCEPTION_HANDLING
+ // Exceptions disabled. Throw asserts instead if enabled.
+ #include <assert.h>
+
diff --git a/media/libsoundtouch/src/STTypes.h b/media/libsoundtouch/src/STTypes.h
index 10ec413855..c823fcfd23 100644
--- a/media/libsoundtouch/src/STTypes.h
+++ b/media/libsoundtouch/src/STTypes.h
@@ -174,7 +174,7 @@ namespace soundtouch
}
// define ST_NO_EXCEPTION_HANDLING switch to disable throwing std exceptions:
-// #define ST_NO_EXCEPTION_HANDLING 1
+#define ST_NO_EXCEPTION_HANDLING 1
#ifdef ST_NO_EXCEPTION_HANDLING
// Exceptions disabled. Throw asserts instead if enabled.
#include <assert.h>
diff --git a/media/libsoundtouch/update.sh b/media/libsoundtouch/update.sh
index f54b69d451..e279cc7ff6 100755
--- a/media/libsoundtouch/update.sh
+++ b/media/libsoundtouch/update.sh
@@ -43,5 +43,6 @@ done
# Patch the imported files.
patch -p1 < moz-libsoundtouch.patch
+patch -p1 < mcp-disableexceptions.patch
echo "Remember to update README_MCP with the version details."