[crux-commits] ports/core (2.4): coreutils: added fix for glibc 2.6

crux at crux.nu crux at crux.nu
Thu Aug 30 08:17:26 UTC 2007


commit 1763ea4648c282890621a32b814eae3d8bc6f091
Author: Juergen Daubert <jue at jue.li>
Date:   Thu Aug 30 10:12:49 2007 +0200

    coreutils: added fix for glibc 2.6

diff --git a/coreutils/.md5sum b/coreutils/.md5sum
index a999fed..41c8b9d 100644
--- a/coreutils/.md5sum
+++ b/coreutils/.md5sum
@@ -1,2 +1,3 @@
 c9607d8495f16e98906e7ed2d9751a06  coreutils-6.9.tar.bz2
+253a70b30fc9ed3e5ecb17dc846acda2  coreutils-futimens.patch
 c05b735710fbd62239588c07084852a0  coreutils-uname.patch
diff --git a/coreutils/Pkgfile b/coreutils/Pkgfile
index 8516e92..c6405be 100644
--- a/coreutils/Pkgfile
+++ b/coreutils/Pkgfile
@@ -4,14 +4,15 @@
 
 name=coreutils
 version=6.9
-release=1
+release=2
 source=(http://ftp.gnu.org/pub/gnu/$name/$name-$version.tar.bz2 \
-        $name-uname.patch)
+        $name-uname.patch $name-futimens.patch)
 
 build() {
     cd $name-$version
     
     patch -p1 < $SRC/$name-uname.patch
+    patch -p1 < $SRC/$name-futimens.patch
     
     DEFAULT_POSIX2_VERSION=199209 \
     ./configure --prefix=/usr \
diff --git a/coreutils/coreutils-futimens.patch b/coreutils/coreutils-futimens.patch
new file mode 100644
index 0000000..966769b
--- /dev/null
+++ b/coreutils/coreutils-futimens.patch
@@ -0,0 +1,55 @@
+http://lists.gnu.org/archive/html/bug-coreutils/2007-05/msg00161.html
+
+diff -Nru coreutils-6.9.orig/lib/utimens.c coreutils-6.9/lib/utimens.c
+--- coreutils-6.9.orig/lib/utimens.c	2007-08-16 11:38:32.268087335 +0200
++++ coreutils-6.9/lib/utimens.c	2007-08-16 11:39:09.626024843 +0200
+@@ -75,8 +75,8 @@
+    Return 0 on success, -1 (setting errno) on failure.  */
+ 
+ int
+-futimens (int fd ATTRIBUTE_UNUSED,
+-	  char const *file, struct timespec const timespec[2])
++gl_futimens (int fd ATTRIBUTE_UNUSED,
++	     char const *file, struct timespec const timespec[2])
+ {
+   /* Some Linux-based NFS clients are buggy, and mishandle time stamps
+      of files in NFS file systems in some cases.  We have no
+@@ -185,5 +185,5 @@
+ int
+ utimens (char const *file, struct timespec const timespec[2])
+ {
+-  return futimens (-1, file, timespec);
++  return gl_futimens (-1, file, timespec);
+ }
+diff -Nru coreutils-6.9.orig/lib/utimens.h coreutils-6.9/lib/utimens.h
+--- coreutils-6.9.orig/lib/utimens.h	2007-08-16 11:38:32.148093960 +0200
++++ coreutils-6.9/lib/utimens.h	2007-08-16 11:39:09.606025947 +0200
+@@ -1,3 +1,3 @@
+ #include <time.h>
+-int futimens (int, char const *, struct timespec const [2]);
++int gl_futimens (int, char const *, struct timespec const [2]);
+ int utimens (char const *, struct timespec const [2]);
+diff -Nru coreutils-6.9.orig/src/copy.c coreutils-6.9/src/copy.c
+--- coreutils-6.9.orig/src/copy.c	2007-08-16 11:38:32.988047587 +0200
++++ coreutils-6.9/src/copy.c	2007-08-16 11:39:01.596468146 +0200
+@@ -518,7 +518,7 @@
+       timespec[0] = get_stat_atime (src_sb);
+       timespec[1] = get_stat_mtime (src_sb);
+ 
+-      if (futimens (dest_desc, dst_name, timespec) != 0)
++      if (gl_futimens (dest_desc, dst_name, timespec) != 0)
+ 	{
+ 	  error (0, errno, _("preserving times for %s"), quote (dst_name));
+ 	  if (x->require_preserve)
+diff -Nru coreutils-6.9.orig/src/touch.c coreutils-6.9/src/touch.c
+--- coreutils-6.9.orig/src/touch.c	2007-08-16 11:38:32.898052555 +0200
++++ coreutils-6.9/src/touch.c	2007-08-16 11:41:10.989324504 +0200
+@@ -182,7 +182,7 @@
+       t = timespec;
+     }
+ 
+-  ok = (futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
++  ok = (gl_futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
+ 
+   if (fd == STDIN_FILENO)
+     {



More information about the crux-commits mailing list