fix FreeBSD before 7 building, broken in r2616
diff --git a/auto/headers b/auto/headers
index cdd5d29..6f5225f 100644
--- a/auto/headers
+++ b/auto/headers
@@ -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
diff --git a/auto/include b/auto/include
index 4139238..3a047d3 100644
--- a/auto/include
+++ b/auto/include
@@ -16,6 +16,7 @@
 
 cat << END > $NGX_AUTOTEST.c
 
+$NGX_INCLUDE_SYS_PARAM_H
 #include <$ngx_include>
 
 int main() {
diff --git a/auto/os/features b/auto/os/features
index f00663c..3a9e1e9 100644
--- a/auto/os/features
+++ b/auto/os/features
@@ -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=
diff --git a/src/os/unix/ngx_freebsd_config.h b/src/os/unix/ngx_freebsd_config.h
index 3771486..997581a 100644
--- a/src/os/unix/ngx_freebsd_config.h
+++ b/src/os/unix/ngx_freebsd_config.h
@@ -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