Re: mod_ruby-1.2.3 released

Shugo Maeda <[email protected]> Mon, 27 Sep 2004 12:09:55 +0900
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>

Hi,

Kevin Bullock wrote:
> I'm getting the following when trying to compile it on Mac OS X (10.3):
> 
> % make
> gcc -g -Os -pipe -no-cpp-precomp -fno-common -DHAVE_INTTYPES_H   -pipe 
> -pipe -Wall -DDARWIN -DUSE_HSREGEX -DUSE_EXPAT  -g -Os -pipe 
> -DHARD_SERVER_LIMIT=2048 -DEAPI -I. 
> -I/usr/lib/ruby/1.6/powerpc-darwin7.0 -I/usr/include/httpd 
> -I../lib/expat-lite   -c mod_ruby.c
> mod_ruby.c: In function `mod_ruby_clearenv':
> mod_ruby.c:906: warning: implicit declaration of function `_NSGetEnviron'
> mod_ruby.c:906: error: invalid type argument of `unary *'
> make: *** [mod_ruby.o] Error 1
> 
> Any thoughts? I poked at the source a bit but didn't come up with anything.

Sorry, can you build mod_ruby with the attached patch?

Shugo



Index: mod_ruby.c
===================================================================
--- mod_ruby.c	(revision 40)
+++ mod_ruby.c	(working copy)
@@ -70,6 +70,7 @@
 #undef environ
 #define environ my_environ
 #elif defined(__APPLE__)
+#include <crt_externs.h>
 #undef environ
 #define environ (*_NSGetEnviron())
 #define GET_ENVIRON(e) (e)