Nginx on OpenBSD

Darrin Chandler dwchandler at stilyagin.com
Fri Mar 21 19:28:27 MSK 2008


On Fri, Mar 21, 2008 at 09:41:33AM +0100, Renaud Allard wrote:
> When trying to compile nginx on OpenBSD (4.2 or 4.3 prerelease), I get
> the following error:
> 
> In file included from src/os/unix/ngx_posix_config.h:74,
>                  from src/core/ngx_config.h:37,
>                  from src/core/nginx.c:7:
> /usr/include/malloc.h:4:2: #warning "<malloc.h> is obsolete, use <stdlib.h>"
> 
> Of course, replacing <malloc.h> by <stdlib.h> in
> src/os/unix/ngx_posix_config.h solves the problem. But isn't there a way
> to detect this at configure time?

I've dealt with this in the OpenBSD port of nginx by adding:

	--with-cc-opt="-DNGX_HAVE_MALLOC_H=0"

I'd rather find a better way to deal with it, but the above works fine.
If you're using the 5.x nginx you might consider using the OpenBSD port
I made, as long as the configured options match what you need.
Otherwise, you might have a peek at /usr/ports/www/nginx/Makefile to
give you some hints on anything I've done to make it work better on
OpenBSD. There are not many special cases, since nginx is BSD friendly.
:)

-- 
Darrin Chandler            |  Phoenix BSD User Group  |  MetaBUG
dwchandler at stilyagin.com   |  http://phxbug.org/      |  http://metabug.org/
http://www.stilyagin.com/  |  Daemons in the Desert   |  Global BUG Federation





More information about the nginx mailing list