Mailing List Archive

r1226 - in trunk/varnish-cache: . bin/varnishd
Author: phk
Date: 2006-12-05 09:47:43 +0100 (Tue, 05 Dec 2006)
New Revision: 1226

Modified:
trunk/varnish-cache/bin/varnishd/storage_file.c
trunk/varnish-cache/configure.ac
Log:
NetBSD Portability fix:

Starting with 3.1, NetBSD uses statvfs and not statfs.

Submitted by: Juan RP <juan at xtrarom.org>


Modified: trunk/varnish-cache/bin/varnishd/storage_file.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/storage_file.c 2006-11-09 10:25:47 UTC (rev 1225)
+++ trunk/varnish-cache/bin/varnishd/storage_file.c 2006-12-05 08:47:43 UTC (rev 1226)
@@ -37,6 +37,11 @@
#include <sys/socket.h>
#include <sys/stat.h>

+#ifdef HAVE_SYS_STATVFS_H
+#include <sys/statvfs.h>
+#define statfs statvfs
+#endif
+
#ifdef HAVE_SYS_VFS_H
#include <sys/vfs.h>
#endif

Modified: trunk/varnish-cache/configure.ac
===================================================================
--- trunk/varnish-cache/configure.ac 2006-11-09 10:25:47 UTC (rev 1225)
+++ trunk/varnish-cache/configure.ac 2006-12-05 08:47:43 UTC (rev 1226)
@@ -45,6 +45,7 @@
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
AC_CHECK_HEADERS([sys/socket.h])
+AC_CHECK_HEADERS([sys/statvfs.h])
AC_CHECK_HEADERS([sys/vfs.h])
AC_CHECK_HEADERS([netinet/in.h])
AC_CHECK_HEADERS([stddef.h])