aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Lynch2012-06-14 14:32:04 -0700
committerMisty De Meo2012-06-15 09:11:49 -0500
commit35506ed7537d42195a14d36eaaa96e230aa13af9 (patch)
tree006edfaa22a4eac1fe4aa5e8301632f576c804bc
parent94996548c1b329b84e284a5afb880a5be06aa79f (diff)
downloadhomebrew-35506ed7537d42195a14d36eaaa96e230aa13af9.tar.bz2
fcgi: fix "Symbol not found: _environ"
Fixes #12844. Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
-rw-r--r--Library/Formula/fcgi.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/Library/Formula/fcgi.rb b/Library/Formula/fcgi.rb
index b4b1a35ce..1c305a330 100644
--- a/Library/Formula/fcgi.rb
+++ b/Library/Formula/fcgi.rb
@@ -5,9 +5,34 @@ class Fcgi < Formula
homepage 'http://www.fastcgi.com/'
md5 'd15060a813b91383a9f3c66faf84867e'
+ def patches
+ # https://trac.macports.org/browser/trunk/dports/www/fcgi/files/patch-libfcgi-fcgi_stdio.c.diff
+ # Fixes "dyld: Symbol not found: _environ"
+ # Affects programs linking this library. Reported at
+ # http://mailman.fastcgi.com/pipermail/fastcgi-developers/2009-January/000152.html
+ DATA
+ end
+
def install
system "./configure", "--disable-debug", "--disable-dependency-tracking",
"--prefix=#{prefix}"
system "make install"
end
end
+
+__END__
+--- a/libfcgi/fcgi_stdio.c
++++ b/libfcgi/fcgi_stdio.c
+@@ -40,7 +40,12 @@
+
+ #ifndef _WIN32
+
++#if defined(__APPLE__)
++#include <crt_externs.h>
++#define environ (*_NSGetEnviron())
++#else
+ extern char **environ;
++#endif
+
+ #ifdef HAVE_FILENO_PROTO
+ #include <stdio.h>