3
0
Fork 0
forked from mirrors/nixpkgs

fix obscure bug in apr on darwin

This commit is contained in:
Eric Seidel 2015-02-03 23:11:44 -08:00
parent ef64865ea9
commit a600443bb3
3 changed files with 18 additions and 18 deletions

View file

@ -1,17 +0,0 @@
diff -Nuar apr-1.4.6/configure apr-1.4.6-darwin-fix-configure/configure
--- apr-1.4.6/configure 2012-02-08 00:17:57.000000000 +0100
+++ apr-1.4.6-darwin-fix-configure/configure 2012-06-06 23:08:56.000000000 +0200
@@ -6854,10 +6854,10 @@
*-apple-darwin*)
if test "x$CPPFLAGS" = "x"; then
- test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp\""
- CPPFLAGS="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp"
+ test "x$silent" != "xyes" && echo " setting CPPFLAGS to \"-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK\""
+ CPPFLAGS="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK"
else
- apr_addto_bugger="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -no-cpp-precomp"
+ apr_addto_bugger="-DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK"
for i in $apr_addto_bugger; do
apr_addto_duplicate="0"
for j in $CPPFLAGS; do

View file

@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "1b4qw686bwjn19iyb0lg918q23xxd6s2gnyczhjq992d3m1vwjp9";
};
patches = stdenv.lib.optionals stdenv.isDarwin [ ./darwin_fix_configure.patch ];
patches = stdenv.lib.optionals stdenv.isDarwin [ ./is-this-a-compiler-bug.patch ];
configureFlags =
# Including the Windows headers breaks unistd.h.

View file

@ -0,0 +1,17 @@
--- apr-1.5.1/file_io/unix/filestat.c 2014-11-01 06:42:50.000000000 -0400
+++ apr-1.5.1/file_io/unix/filestat.c.new 2014-11-01 07:07:32.000000000 -0400
@@ -297,9 +297,11 @@
finfo->pool = pool;
finfo->fname = fname;
fill_out_finfo(finfo, &info, wanted);
- if (wanted & APR_FINFO_LINK)
- wanted &= ~APR_FINFO_LINK;
- return (wanted & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;
+ if (wanted & APR_FINFO_LINK) {
+ return ((wanted & ~APR_FINFO_LINK) & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;
+ } else {
+ return (wanted & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;
+ }
}
else {
#if !defined(ENOENT) || !defined(ENOTDIR)