Ticket #2808: build failure on FreeBSD 6.

sys/param.h needs to be included before sys/mount.h on FreeBSD 6,
otherwise compiling fails with undefined identifier NGROUPS.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Phil Krylov 2012-05-13 14:49:30 +04:00 committed by Andrew Borodin
parent 75febfe7c7
commit 7c425e8500
1 changed files with 5 additions and 5 deletions

View File

@ -38,6 +38,11 @@
#include <errno.h>
/* This header needs to be included before sys/mount.h on *BSD */
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#if defined STAT_STATVFS || defined STAT_STATVFS64 /* POSIX 1003.1-2001 (and later) with XSI */
#include <sys/statvfs.h>
#else
@ -47,11 +52,6 @@
#include <unistd.h>
#include <sys/stat.h>
/* This header needs to be included before sys/mount.h on *BSD */
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
#endif
#ifdef MOUNTED_GETFSSTAT /* OSF_1 and Darwin1.3.x */
#ifdef HAVE_SYS_UCRED_H
#include <grp.h> /* needed on OSF V4.0 for definition of NGROUPS,