You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Behlendorf <br...@hyperreal.org> on 1997/07/22 04:19:16 UTC

error compiling mod_mime_magic

Do I have my libraries messed up?  I don't think so as I also get this
error with cc, using different header libraries.  This was the first time
I've tried out mod_mime_magic on BSDI.


gcc -c   -O2 -DSTATUS -g -DSUEXEC_BIN="\"/usr/local/www.tools/bin/suexec\""
-Wall  mod_mime_magic.c
In file included from conf.h:677,
                 from httpd.h:59,
                 from mod_mime_magic.c:126:
/usr/local/lib/gcc-lib/i386-unknown-bsdi2.1/2.7.2.1/include/sys/wait.h:98:
redefinition of `union wait'
*** Error code 1

Stop.

Right now my brain isn't capable of tracking this down....

	Brian


--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
"Why not?" - TL           brian@organic.com - hyperreal.org - apache.org

Re: error compiling mod_mime_magic

Posted by Marc Slemko <ma...@worldgate.com>.
The problem is that both conf.h and mod_mime_magic include sys/wait.h, and
it isn't ifdefed to prevent multiple inclusion in BSD/OS.  I think that is
bogus.

Lese.... I can fix some of that.  Patch appended.  Some would argue that
if a module needs certain header files, it should include them period.
Howver, I'm not sure that is a practical idea from a portability
viewpoint.  Note that I am concerned that utime.h may not be available
everywhere. 

Index: mod_mime_magic.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_mime_magic.c,v
retrieving revision 1.6
diff -u -r1.6 mod_mime_magic.c
--- mod_mime_magic.c	1997/07/17 22:27:39	1.6
+++ mod_mime_magic.c	1997/07/22 04:45:44
@@ -118,17 +118,14 @@
  * 
  */
 
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <utime.h>
-#include <stdarg.h>
 #include "httpd.h"
 #include "http_config.h"
 #include "http_request.h"
 #include "http_core.h"
 #include "http_log.h"
 #include "http_protocol.h"
+
+#include <utime.h>
 
 
 /*


On Mon, 21 Jul 1997, Brian Behlendorf wrote:

> 
> Do I have my libraries messed up?  I don't think so as I also get this
> error with cc, using different header libraries.  This was the first time
> I've tried out mod_mime_magic on BSDI.
> 
> 
> gcc -c   -O2 -DSTATUS -g -DSUEXEC_BIN="\"/usr/local/www.tools/bin/suexec\""
> -Wall  mod_mime_magic.c
> In file included from conf.h:677,
>                  from httpd.h:59,
>                  from mod_mime_magic.c:126:
> /usr/local/lib/gcc-lib/i386-unknown-bsdi2.1/2.7.2.1/include/sys/wait.h:98:
> redefinition of `union wait'
> *** Error code 1
> 
> Stop.
> 
> Right now my brain isn't capable of tracking this down....
> 
> 	Brian
> 
> 
> --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
> "Why not?" - TL           brian@organic.com - hyperreal.org - apache.org
>