Unverified Commit 138326d6 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

livekit-libwebrtc: fix builds on darwin (#368147)

parents 444c1e08 3082f673
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
diff --git a/BUILD.gn b/BUILD.gn
index 598bbbcb72..62c6c5a187 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -138,7 +138,7 @@ config("library_impl_config") {
 # target_defaults and direct_dependent_settings.
 config("common_inherited_config") {
   defines = []
-  cflags = [ "-fvisibility=default" ]
+  cflags = [ "-fvisibility=default", "-Wno-error=c++11-narrowing-const-reference" ]
   ldflags = [ "-lavutil", "-lavformat", "-lavcodec" ]
 
   if (rtc_dlog_always_on) {
+28 −24
Original line number Diff line number Diff line
@@ -78,7 +78,8 @@ stdenv.mkDerivation {

  src = "${sources}/src";

  patches = [
  patches =
    [
      # Adds missing dependencies to generated LICENSE
      (fetchpatch {
        url = "https://raw.githubusercontent.com/livekit/rust-sdks/b41861c7b71762d5d85b3de07ae67ffcae7c3fa2/webrtc-sys/libwebrtc/patches/add_licenses.patch";
@@ -101,6 +102,9 @@ stdenv.mkDerivation {
      })
      # Required for dynamically linking to ffmpeg libraries and exposing symbols
      ./0001-shared-libraries.patch
    ]
    ++ lib.optionals stdenv.hostPlatform.isDarwin [
      ./0002-disable-narrowing-const-reference.patch
    ];

  postPatch =