[gvfs] build: Fix all statfs() tests failing
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs] build: Fix all statfs() tests failing
- Date: Tue, 7 Jun 2016 13:17:22 +0000 (UTC)
commit 66df8f2afbe46e27052f98321c633ccecebbafb1
Author: Bastien Nocera <hadess hadess net>
Date: Mon Apr 4 10:57:20 2016 +0200
build: Fix all statfs() tests failing
The current statfs() compilation tests all fail because statfs() expects
the first argument to be non-null. Pass a dummy path instead of NULL to
satisfy the compiler.
The patch is taken from GLib, see Bug 764574.
https://bugzilla.gnome.org/show_bug.cgi?id=767331
configure.ac | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a6085e1..ddfad4a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -835,7 +835,7 @@ if test "$ac_cv_func_statfs" = yes ; then
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#endif], [struct statfs st;
- statfs(NULL, &st);],[
+ statfs("/", &st);],[
AC_MSG_RESULT([2])
AC_DEFINE(STATFS_ARGS, 2, [Number of arguments to statfs()])],[
AC_TRY_COMPILE([#include <unistd.h>
@@ -851,7 +851,7 @@ if test "$ac_cv_func_statfs" = yes ; then
#ifdef HAVE_SYS_STATFS_H
#include <sys/statfs.h>
#endif], [struct statfs st;
- statfs(NULL, &st, sizeof (st), 0);],[
+ statfs("/", &st, sizeof (st), 0);],[
AC_MSG_RESULT([4])
AC_DEFINE(STATFS_ARGS, 4, [Number of arguments to statfs()])],[
AC_MSG_RESULT(unknown)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]