diff --git a/pkgs/development/libraries/apr/default.nix b/pkgs/development/libraries/apr/default.nix index d9409636bd0d..2ce4b77927f1 100644 --- a/pkgs/development/libraries/apr/default.nix +++ b/pkgs/development/libraries/apr/default.nix @@ -23,10 +23,18 @@ stdenv.mkDerivation rec { configureFlagsArray+=("--with-installbuilddir=$dev/share/build") ''; - configureFlags = + configureFlags = stdenv.lib.optional (stdenv.hostPlatform != stdenv.buildPlatform) [ + "ac_cv_file__dev_zero=yes" + "ac_cv_func_setpgrp_void=0" + "apr_cv_process_shared_works=1" + "apr_cv_tcp_nodelay_with_cork=1" + ] ++ stdenv.lib.optionals (stdenv.hostPlatform.system == "i686-cygwin") [ # Including the Windows headers breaks unistd.h. # Based on ftp://sourceware.org/pub/cygwin/release/libapr1/libapr1-1.3.8-2-src.tar.bz2 - stdenv.lib.optional (stdenv.hostPlatform.system == "i686-cygwin") "ac_cv_header_windows_h=no"; + "ac_cv_header_windows_h=no" + ]; + + CPPFLAGS=stdenv.lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) "-DAPR_IOVEC_DEFINED"; enableParallelBuilding = true;