Index: [Article Count Order] [Thread]

Date:  Mon, 27 Sep 2004 12:09:55 +0900
From:  Shugo Maeda <shugo@...>
Subject:  Re: mod_ruby-1.2.3 released
To:  modruby@... (modruby ML)
Message-Id:  <41578483.6070006@...>
In-Reply-To:  <95D9EE28-1024-11D9-8724-000393BDB320@...>
References:  <4156F2F3.7020207@...> <95D9EE28-1024-11D9-8724-000393BDB320@...>
X-Mail-Count: 01320



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)