Unverified Commit a25cd2de authored by Michael Daniels's avatar Michael Daniels Committed by GitHub
Browse files

aprutil: unbreak Darwin/LLVM compilation, unvendor patch (#513395)

parents 16584803 c4ab7684
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
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 <stdlib.h>
 #include <stdio.h>
 #include <$apu_try_berkeley_db_header>
-main ()
+int main ()
 {
   int major, minor, patch;
 
+11 −1
Original line number Diff line number Diff line
@@ -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;