zed/nix/livekit-libwebrtc/0001-shared-libraries.patch
Jakub Konka 0c43ce8847
nix: Hide pipewire lazy trampolines in libwebrtc when linking as SO (#50743)
This would cause a null pointer dereference when trying to open an audio
device in Zed. More context:
https://github.com/NixOS/nixpkgs/pull/478907/changes#r2885943326

cc @cameron1024 

Release Notes:

- Fixed crash when trying to join a channel/test audio on Nix-built Zed
on Linux.
2026-03-04 23:14:06 +01:00

17 lines
545 B
Diff

--- a/BUILD.gn
+++ b/BUILD.gn
@@ -143,8 +143,12 @@
# target_defaults and direct_dependent_settings.
config("common_inherited_config") {
defines = [ "PROTOBUF_ENABLE_DEBUG_LOGGING_MAY_LEAK_PII=0" ]
- cflags = []
- ldflags = []
+ cflags = [ "-fvisibility=default" ]
+ ldflags = [ "-lavutil", "-lavformat", "-lavcodec" ]
+
+ if (is_linux) {
+ ldflags += [ "-Wl,--version-script=" + rebase_path("//libwebrtc.version", root_build_dir) ]
+ }
if (rtc_objc_prefix != "") {
defines += [ "RTC_OBJC_TYPE_PREFIX=${rtc_objc_prefix}" ]