Skip to content

Commit

Permalink
ruby: upstream patch for shared library reference to _environ
Browse files Browse the repository at this point in the history
Hey, we can compile vim against Ruby 1.9 now!

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
  • Loading branch information
jacknagel committed Oct 16, 2012
1 parent f2ade07 commit 1b726f7
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Library/Formula/ruby.rb
Expand Up @@ -25,6 +25,9 @@ class Ruby < Formula
build 2326
end

# https://github.com/ruby/ruby/commit/2741a598ff9e561c71eb39a57bb19c0a3205eaef
def patches; DATA end

def install
system "autoconf" if build.head?

Expand Down Expand Up @@ -60,3 +63,22 @@ def caveats; <<-EOS.undent
EOS
end
end

__END__
diff --git a/missing/setproctitle.c b/missing/setproctitle.c
index 169ba8b..4dc6d03 100644
--- a/missing/setproctitle.c
+++ b/missing/setproctitle.c
@@ -48,6 +48,12 @@
#endif
#include <string.h>

+#if defined(__APPLE__)
+#include <crt_externs.h>
+#undef environ
+#define environ (*_NSGetEnviron())
+#endif
+
#define SPT_NONE 0 /* don't use it at all */
#define SPT_PSTAT 1 /* use pstat(PSTAT_SETCMD, ...) */
#define SPT_REUSEARGV 2 /* cover argv with title information */

0 comments on commit 1b726f7

Please sign in to comment.