From 781d21ec7b4bda4d378864432803abecfd628283 Mon Sep 17 00:00:00 2001 From: collecting Date: Tue, 7 Oct 2025 07:24:32 +0000 Subject: [PATCH] add: Discord-RPC wclass memaccess Patch --- patches/discord-rpc-wclass-memaccess-fix.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 patches/discord-rpc-wclass-memaccess-fix.patch diff --git a/patches/discord-rpc-wclass-memaccess-fix.patch b/patches/discord-rpc-wclass-memaccess-fix.patch new file mode 100644 index 000000000..e640611cf --- /dev/null +++ b/patches/discord-rpc-wclass-memaccess-fix.patch @@ -0,0 +1,18 @@ +diff --git CMakeLists.txt CMakeLists.txt +index 5dad9e9..972183d 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -51,6 +51,13 @@ add_library(rapidjson STATIC IMPORTED ${RAPIDJSON}) + # add subdirs + + add_subdirectory(src) ++ ++# Suppress the -Wclass-memaccess warning from modern GCC/Clang in rapidjson. ++# This warning flags intentional, performance-oriented code in the library. ++if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang") ++ target_compile_options(discord-rpc PRIVATE "-Wno-class-memaccess") ++endif() ++ + if (BUILD_EXAMPLES) + add_subdirectory(examples/send-presence) + endif(BUILD_EXAMPLES)