nginx-0.7.46
Igor Sysoev
is at rambler-co.ru
Mon Mar 30 16:21:11 MSD 2009
On Mon, Mar 30, 2009 at 03:43:19PM +0400, Maxim Dounin wrote:
> On Mon, Mar 30, 2009 at 03:06:21PM +0400, Igor Sysoev wrote:
>
> > Changes with nginx 0.7.46 30 Mar 2009
> >
> > *) Bugfix: the previous release tarball was incorrect.
>
> I've got the following under FreeBSD 6.2:
>
> cd nginx
> && make
> make -f objs/Makefile
> gcc -c -O -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
> -Wno-unused-function -Wunused-variable -Wunused-value -Werror -g
> -D NGX_DEBUG_MALLOC -I src/core -I src/event -I
> src/event/modules -I src/os/unix -I /usr/local/include -I objs
> -o objs/src/core/nginx.o src/core/nginx.c
> In file included from /usr/include/sys/mount.h:36,
> from src/os/unix/ngx_freebsd_config.h:25,
> from src/core/ngx_config.h:21,
> from src/core/nginx.c:7:
> /usr/include/sys/ucred.h:71: error: `NGROUPS' undeclared here (not
> in a function)
> *** Error code 1
>
> Including sys/param.h before sys/mount.h as statfs() manpage
> suggests fixes this issue, but then it dies with:
>
> src/os/unix/ngx_files.c: In function `ngx_fs_bsize':
> src/os/unix/ngx_files.c:444: error: storage size of 'fs' isn't known
> src/os/unix/ngx_files.c:446: warning: implicit declaration of function `statvfs'
> src/os/unix/ngx_files.c:444: warning: unused variable `fs'
> *** Error code 1
>
> Including sys/statvfs.h as statvfs() manpage suggests fixes this
> issue too. With the following patch I was able to build it under
> FreeBSD 6.2:
>
> diff --git a/src/os/unix/ngx_freebsd_config.h b/src/os/unix/ngx_freebsd_config.h
> --- a/src/os/unix/ngx_freebsd_config.h
> +++ b/src/os/unix/ngx_freebsd_config.h
> @@ -22,7 +22,9 @@
> #include <grp.h>
> #include <dirent.h>
> #include <glob.h>
> +#include <sys/param.h>
> #include <sys/mount.h> /* statfs() */
> +#include <sys/statvfs.h>
>
> #include <sys/filio.h> /* FIONBIO */
> #include <sys/uio.h>
The patch attached. The <sys/statvfs.h> is not needed on FreeBSD.
--
Igor Sysoev
http://sysoev.ru/en/
-------------- next part --------------
Index: src/os/unix/ngx_freebsd_config.h
===================================================================
--- src/os/unix/ngx_freebsd_config.h (revision 1943)
+++ src/os/unix/ngx_freebsd_config.h (working copy)
@@ -22,6 +22,7 @@
#include <grp.h>
#include <dirent.h>
#include <glob.h>
+#include <sys/param.h> /* ALIGN() */
#include <sys/mount.h> /* statfs() */
#include <sys/filio.h> /* FIONBIO */
@@ -44,7 +45,6 @@
#include <libutil.h> /* setproctitle() before 4.1 */
#include <osreldate.h>
#include <sys/sysctl.h>
-#include <sys/param.h> /* ALIGN() */
#if __FreeBSD_version < 400017
Index: auto/os/features
===================================================================
--- auto/os/features (revision 1943)
+++ auto/os/features (working copy)
@@ -210,7 +210,8 @@
ngx_feature="statfs()"
ngx_feature_name="NGX_HAVE_STATFS"
ngx_feature_run=no
-ngx_feature_incs="$NGX_INCLUDE_SYS_MOUNT_H
+ngx_feature_incs="$NGX_INCLUDE_SYS_PARAM_H
+ $NGX_INCLUDE_SYS_MOUNT_H
$NGX_INCLUDE_SYS_VFS_H"
ngx_feature_path=
ngx_feature_libs=
Index: auto/include
===================================================================
--- auto/include (revision 1943)
+++ auto/include (working copy)
@@ -16,6 +16,7 @@
cat << END > $NGX_AUTOTEST.c
+$NGX_INCLUDE_SYS_PARAM_H
#include <$ngx_include>
int main() {
Index: auto/headers
===================================================================
--- auto/headers (revision 1943)
+++ auto/headers (working copy)
@@ -6,6 +6,7 @@
ngx_include="inttypes.h"; . auto/include
ngx_include="limits.h"; . auto/include
ngx_include="sys/filio.h"; . auto/include
+ngx_include="sys/param.h"; . auto/include
ngx_include="sys/mount.h"; . auto/include
ngx_include="sys/statvfs.h"; . auto/include
ngx_include="crypt.h"; . auto/include
More information about the nginx
mailing list