From db20771ef36bfa5bc0dc624cf245844507724107 Mon Sep 17 00:00:00 2001 From: Nadia Holmquist Pedersen Date: Mon, 24 Jun 2024 05:25:00 +0200 Subject: [PATCH] slirp: Add -fvisibility=hidden to glib stub On Linux, our stubbed glib functions were conflicting with the ones from real glib, which gets used by Qt when we're running on a GTK-based desktop. Avoid a crash by not exposing them. --- src/frontend/libslirp/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/frontend/libslirp/CMakeLists.txt b/src/frontend/libslirp/CMakeLists.txt index cb009a6cad..67b8ac78db 100644 --- a/src/frontend/libslirp/CMakeLists.txt +++ b/src/frontend/libslirp/CMakeLists.txt @@ -62,4 +62,6 @@ elseif(HAIKU) target_Link_libraries(slirp PRIVATE network) elseif(APPLE) target_link_libraries(slirp PRIVATE resolv) +else() + set_source_files_properties(glib/glib.c PROPERTIES COMPILE_FLAGS -fvisibility=hidden) endif()