about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/mp4v2
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2021-01-26 18:06:19 +0000
committerAlyssa Ross <hi@alyssa.is>2021-01-26 18:21:18 +0000
commit7ac6743433dd45ceaead2ca96f6356dc0d064ce6 (patch)
treeb68ec89d7d2a8d2b6e6b1ff94ba26d6af4096350 /nixpkgs/pkgs/development/libraries/mp4v2
parentc5c7451dbef37b51f52792d6395a670ef5183d27 (diff)
parent891f607d5301d6730cb1f9dcf3618bcb1ab7f10e (diff)
downloadnixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.gz
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.bz2
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.lz
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.xz
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.tar.zst
nixlib-7ac6743433dd45ceaead2ca96f6356dc0d064ce6.zip
Merge commit '891f607d5301d6730cb1f9dcf3618bcb1ab7f10e'
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/mp4v2')
-rw-r--r--nixpkgs/pkgs/development/libraries/mp4v2/default.nix3
-rw-r--r--nixpkgs/pkgs/development/libraries/mp4v2/fix-build-clang.patch13
2 files changed, 16 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/mp4v2/default.nix b/nixpkgs/pkgs/development/libraries/mp4v2/default.nix
index 3a036fcf6fbf..7a6bbb552027 100644
--- a/nixpkgs/pkgs/development/libraries/mp4v2/default.nix
+++ b/nixpkgs/pkgs/development/libraries/mp4v2/default.nix
@@ -19,6 +19,9 @@ stdenv.mkDerivation rec {
       url = "https://git.archlinux.org/svntogit/packages.git/plain/trunk/libmp4v2-c++11.patch?id=203f5a72bc97ffe089b424c47b07dd9eaea35713";
       sha256 = "0sbn0il7lmk77yrjyb4f0a3z3h8gsmdkscvz5n9hmrrrhrwf672w";
     })
+  ] ++ lib.optionals stdenv.cc.isClang [
+    # unbreak build with Clang≄6 (C++14 by default). Based on https://reviews.freebsd.org/rP458678
+    ./fix-build-clang.patch
   ];
 
   NIX_CFLAGS_COMPILE = [ "-Wno-error=narrowing" ];
diff --git a/nixpkgs/pkgs/development/libraries/mp4v2/fix-build-clang.patch b/nixpkgs/pkgs/development/libraries/mp4v2/fix-build-clang.patch
new file mode 100644
index 000000000000..5d99f1951f7a
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/mp4v2/fix-build-clang.patch
@@ -0,0 +1,13 @@
+diff --git a/src/mp4.cpp b/src/mp4.cpp
+index c2a7238..9bb3e38 100644
+--- a/src/mp4.cpp
++++ b/src/mp4.cpp
+@@ -870,7 +870,7 @@ MP4FileHandle MP4ReadProvider( const char* fileName, const MP4FileProvider* file
+         }
+ 
+         catch (...) {
+-            return MP4_INVALID_TRACK_ID;
++            return NULL;
+         }
+     }
+