diff --git a/patches/discord-rpc-wclass-memaccess-fix.patch b/patches/discord-rpc-wclass-memaccess-fix.patch index e640611cf..0cbd2eae9 100644 --- a/patches/discord-rpc-wclass-memaccess-fix.patch +++ b/patches/discord-rpc-wclass-memaccess-fix.patch @@ -7,10 +7,11 @@ index 5dad9e9..972183d 100644 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") ++# Suppress memcpy warnings from modern GCC/Clang in rapidjson. ++if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") + target_compile_options(discord-rpc PRIVATE "-Wno-class-memaccess") ++elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang|AppleClang") ++ target_compile_options(discord-rpc PRIVATE "-Wno-nontrivial-memcall") +endif() + if (BUILD_EXAMPLES)