diff --git a/pkgs/by-name/ap/aprutil/clang-bdb.patch b/pkgs/by-name/ap/aprutil/clang-bdb.patch deleted file mode 100644 index 02e9c8378c63..000000000000 --- a/pkgs/by-name/ap/aprutil/clang-bdb.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ur a/build/dbm.m4 b/build/dbm.m4 ---- a/build/dbm.m4 2013-11-23 13:00:53.000000000 -0500 -+++ b/build/dbm.m4 2023-10-22 20:16:37.764571446 -0400 -@@ -235,7 +235,7 @@ - #include - #include - #include <$apu_try_berkeley_db_header> --main () -+int main () - { - int major, minor, patch; - diff --git a/pkgs/by-name/ap/aprutil/package.nix b/pkgs/by-name/ap/aprutil/package.nix index f140e7a61493..1426ed26556f 100644 --- a/pkgs/by-name/ap/aprutil/package.nix +++ b/pkgs/by-name/ap/aprutil/package.nix @@ -2,6 +2,7 @@ lib, stdenv, fetchurl, + fetchpatch, makeWrapper, apr, expat, @@ -34,7 +35,16 @@ stdenv.mkDerivation (finalAttrs: { patches = [ ./fix-libxcrypt-build.patch # Fix incorrect Berkeley DB detection with newer versions of clang due to implicit `int` on main errors. - ./clang-bdb.patch + (fetchpatch { + url = "https://github.com/apache/apr-util/commit/2d838ff7319bd384a0b177f40ac19c4b6c81436d.patch?full_index=1"; + hash = "sha256-/N6V5D1d9R6AVjHUwy3Ne839D3ZSsF3Hpn8W9sx1sXM="; + excludes = [ "CHANGES" ]; + }) + # Fix error with missing function prototype + (fetchpatch { + url = "https://github.com/apache/apr-util/commit/e67caa006c75181b45b761cd50294cb3c8e18f1a.patch?full_index=1"; + hash = "sha256-fwKT7mGPHIgJ5uG/KAOOE/38FSNfow+GJgHCxcp9mgI="; + }) ] ++ lib.optional stdenv.hostPlatform.isFreeBSD ./include-static-dependencies.patch;