coreutils-6.0: apply patch for USE_STATVFS
authorChris Larson <chris_larson@mentor.com>
Sun, 17 Oct 2010 06:14:20 +0000 (23:14 -0700)
committerChris Larson <chris_larson@mentor.com>
Wed, 20 Oct 2010 17:01:38 +0000 (10:01 -0700)
Fixes compile error on platforms where statvfs does not have an f_type member
(e.g. OSX).  See
http://www.mail-archive.com/bug-coreutils@gnu.org/msg06552.html for details.

Signed-off-by: Chris Larson <chris_larson@mentor.com>
recipes/coreutils/coreutils-6.0.inc
recipes/coreutils/coreutils-6.0/USE_STATVFS.patch [new file with mode: 0644]
recipes/coreutils/coreutils_6.0.bb

index fb5abbc..05a2ef1 100644 (file)
@@ -6,4 +6,5 @@ SRC_URI = "\
   ftp://alpha.gnu.org/gnu/coreutils/coreutils-${PV}.tar.bz2 \
   file://futimens.patch \
   file://coreutils-install-use-STRIP.patch \
+  file://USE_STATVFS.patch \
 "
diff --git a/recipes/coreutils/coreutils-6.0/USE_STATVFS.patch b/recipes/coreutils/coreutils-6.0/USE_STATVFS.patch
new file mode 100644 (file)
index 0000000..b96ad99
--- /dev/null
@@ -0,0 +1,26 @@
+From 5ce0b45a43fc2de8862a439b6e6281fdd55e27ed Mon Sep 17 00:00:00 2001
+From: Paul Eggert <eggert@cs.ucla.edu>
+Date: Tue, 15 Aug 2006 23:23:28 +0000
+Subject: [PATCH] (USE_STATVFS): Define to 0 if f_type is needed, but
+ statvfs.f_type not present.
+
+---
+ src/stat.c |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/src/stat.c b/src/stat.c
+index 4c6047c..481096d 100644
+--- a/src/stat.c
++++ b/src/stat.c
+@@ -20,7 +20,8 @@
+ #include <config.h>
+
+ #if (STAT_STATVFS \
+-     && (HAVE_STRUCT_STATVFS_F_BASETYPE || ! HAVE_STRUCT_STATFS_F_FSTYPENAME))
++     && (HAVE_STRUCT_STATVFS_F_BASETYPE \
++         || (! HAVE_STRUCT_STATFS_F_FSTYPENAME && HAVE_STRUCT_STATVFS_F_TYPE)))
+ # define USE_STATVFS 1
+ #else
+ # define USE_STATVFS 0
+--
+1.7.2.3
index 32f0f1f..afa2cd7 100644 (file)
@@ -1,7 +1,7 @@
 require coreutils-${PV}.inc
 require coreutils-target.inc
 
-PR = "r3"
+PR = "r4"
 
 SRC_URI += "\
   file://man.patch \