Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix "Symbol not found: _environ" on Lion.

  • Loading branch information...
commit b1cb340e1bf9b01213d4b0ee55f445a5eee2b380 1 parent 543620e
@seanlynch authored
Showing with 25 additions and 0 deletions.
  1. +25 −0 Library/Formula/fcgi.rb
View
25 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" on Lion (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>
Please sign in to comment.
Something went wrong with that request. Please try again.