[glib] Check availability of linux/magic.h
- From: Martin Nordholts <martinn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Check availability of linux/magic.h
- Date: Tue, 8 Mar 2011 18:18:29 +0000 (UTC)
commit 37858f7f5ef842c606f99e4808a591c4773550c0
Author: Martin Nordholts <martinn src gnome org>
Date: Tue Mar 8 07:36:15 2011 +0100
Check availability of linux/magic.h
Check availability of linux/magic.h. It isn't available in Linux
versions before 2.6.19.
configure.ac | 1 +
glib/gfileutils.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index adc2da8..1fafc76 100644
--- a/configure.ac
+++ b/configure.ac
@@ -903,6 +903,7 @@ AC_CHECK_HEADERS([sys/select.h sys/types.h stdint.h inttypes.h sched.h malloc.h]
AC_CHECK_HEADERS([sys/vfs.h sys/mount.h sys/vmount.h sys/statfs.h sys/statvfs.h])
AC_CHECK_HEADERS([mntent.h sys/mnttab.h sys/vfstab.h sys/mntctl.h sys/sysctl.h fstab.h])
AC_CHECK_HEADERS([sys/uio.h sys/mkdev.h])
+AC_CHECK_HEADERS([linux/magic.h])
# check for structure fields
AC_CHECK_MEMBERS([struct stat.st_mtimensec, struct stat.st_mtim.tv_nsec, struct stat.st_atimensec, struct stat.st_atim.tv_nsec, struct stat.st_ctimensec, struct stat.st_ctim.tv_nsec])
diff --git a/glib/gfileutils.c b/glib/gfileutils.c
index a87f0e9..da6cacd 100644
--- a/glib/gfileutils.c
+++ b/glib/gfileutils.c
@@ -53,7 +53,7 @@
#include "gstdio.h"
#include "glibintl.h"
-#ifdef __linux__ /* for btrfs check */
+#ifdef HAVE_LINUX_MAGIC_H /* for btrfs check */
#include <linux/magic.h>
#include <sys/vfs.h>
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]