From 6314fb5adcd8887dd13fdfa3d0cec9a4605df487 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Sun, 3 Jun 2007 13:34:10 +0000 Subject: [PATCH] Clifford Wolf: Fixed futimens() function name collision (glibc2.6) [2007060101031614396] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@8549 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- package/base/coreutils/futimens.patch | 56 +++++++++++++++++++++++++++ package/base/cpio/futimens.patch | 25 ++++++++++++ package/base/gzip/futimens.patch | 36 +++++++++++++++++ package/base/tar/futimens.patch | 36 +++++++++++++++++ 4 files changed, 153 insertions(+) create mode 100644 package/base/coreutils/futimens.patch create mode 100644 package/base/cpio/futimens.patch create mode 100644 package/base/gzip/futimens.patch create mode 100644 package/base/tar/futimens.patch diff --git a/package/base/coreutils/futimens.patch b/package/base/coreutils/futimens.patch new file mode 100644 index 000000000..cb90378a6 --- /dev/null +++ b/package/base/coreutils/futimens.patch @@ -0,0 +1,56 @@ +--- ./lib/utimens.h.orig 2007-05-31 08:26:00.000000000 +0200 ++++ ./lib/utimens.h 2007-05-31 08:26:16.000000000 +0200 +@@ -1,3 +1,3 @@ + #include +-int futimens (int, char const *, struct timespec const [2]); ++int futimens_local (int, char const *, struct timespec const [2]); + int utimens (char const *, struct timespec const [2]); +--- ./lib/utimens.c.orig 2007-05-31 08:26:00.000000000 +0200 ++++ ./lib/utimens.c 2007-05-31 08:26:23.000000000 +0200 +@@ -75,7 +75,7 @@ + Return 0 on success, -1 (setting errno) on failure. */ + + int +-futimens (int fd ATTRIBUTE_UNUSED, ++futimens_local (int fd ATTRIBUTE_UNUSED, + char const *file, struct timespec const timespec[2]) + { + /* Some Linux-based NFS clients are buggy, and mishandle time stamps +@@ -185,5 +185,5 @@ + int + utimens (char const *file, struct timespec const timespec[2]) + { +- return futimens (-1, file, timespec); ++ return futimens_local (-1, file, timespec); + } +--- ./src/touch.c.orig 2007-05-31 08:26:00.000000000 +0200 ++++ ./src/touch.c 2007-05-31 08:26:29.000000000 +0200 +@@ -167,7 +167,7 @@ + + if (amtime_now) + { +- /* Pass NULL to futimens so it will not fail if we have ++ /* Pass NULL to futimens_local so it will not fail if we have + write access to the file, but don't own it. */ + t = NULL; + } +@@ -182,7 +182,7 @@ + t = timespec; + } + +- ok = (futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0); ++ ok = (futimens_local (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0); + + if (fd == STDIN_FILENO) + { +--- ./src/copy.c.orig 2007-05-31 08:26:00.000000000 +0200 ++++ ./src/copy.c 2007-05-31 08:26:36.000000000 +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 (futimens_local (dest_desc, dst_name, timespec) != 0) + { + error (0, errno, _("preserving times for %s"), quote (dst_name)); + if (x->require_preserve) diff --git a/package/base/cpio/futimens.patch b/package/base/cpio/futimens.patch new file mode 100644 index 000000000..f22d43b8f --- /dev/null +++ b/package/base/cpio/futimens.patch @@ -0,0 +1,25 @@ +--- ./lib/utimens.c.orig 2007-06-01 00:23:36.000000000 +0200 ++++ ./lib/utimens.c 2007-06-01 00:23:48.000000000 +0200 +@@ -73,7 +73,7 @@ + Return 0 on success, -1 (setting errno) on failure. */ + + int +-futimens (int fd ATTRIBUTE_UNUSED, ++futimens_local (int fd ATTRIBUTE_UNUSED, + char const *file, struct timespec const timespec[2]) + { + /* There's currently no interface to set file timestamps with +@@ -166,5 +166,5 @@ + int + utimens (char const *file, struct timespec const timespec[2]) + { +- return futimens (-1, file, timespec); ++ return futimens_local (-1, file, timespec); + } +--- ./lib/utimens.h.orig 2007-06-01 00:23:36.000000000 +0200 ++++ ./lib/utimens.h 2007-06-01 00:23:52.000000000 +0200 +@@ -1,3 +1,3 @@ + #include "timespec.h" +-int futimens (int, char const *, struct timespec const [2]); ++int futimens_local (int, char const *, struct timespec const [2]); + int utimens (char const *, struct timespec const [2]); diff --git a/package/base/gzip/futimens.patch b/package/base/gzip/futimens.patch new file mode 100644 index 000000000..164964aa8 --- /dev/null +++ b/package/base/gzip/futimens.patch @@ -0,0 +1,36 @@ +--- ./gzip.c.orig 2007-05-31 01:30:19.000000000 +0200 ++++ ./gzip.c 2007-05-31 01:43:30.000000000 +0200 +@@ -1650,7 +1650,7 @@ + } + } + +- if (futimens (ofd, ofname, timespec) != 0) ++ if (futimens_local (ofd, ofname, timespec) != 0) + { + int e = errno; + WARN ((stderr, "%s: ", program_name)); +--- ./lib/utimens.c.orig 2007-05-31 01:42:36.000000000 +0200 ++++ ./lib/utimens.c 2007-05-31 01:42:47.000000000 +0200 +@@ -75,7 +75,7 @@ + Return 0 on success, -1 (setting errno) on failure. */ + + int +-futimens (int fd ATTRIBUTE_UNUSED, ++futimens_local (int fd ATTRIBUTE_UNUSED, + char const *file, struct timespec const timespec[2]) + { + /* Some Linux-based NFS clients are buggy, and mishandle time stamps +@@ -185,5 +185,5 @@ + int + utimens (char const *file, struct timespec const timespec[2]) + { +- return futimens (-1, file, timespec); ++ return futimens_local (-1, file, timespec); + } +--- ./lib/utimens.h.orig 2007-05-31 01:42:50.000000000 +0200 ++++ ./lib/utimens.h 2007-05-31 01:42:55.000000000 +0200 +@@ -1,3 +1,3 @@ + #include "timespec.h" +-int futimens (int, char const *, struct timespec const [2]); ++int futimens_local (int, char const *, struct timespec const [2]); + int utimens (char const *, struct timespec const [2]); diff --git a/package/base/tar/futimens.patch b/package/base/tar/futimens.patch new file mode 100644 index 000000000..99b5b6d9d --- /dev/null +++ b/package/base/tar/futimens.patch @@ -0,0 +1,36 @@ +--- ./lib/utimens.c.orig 2007-05-31 08:37:07.000000000 +0200 ++++ ./lib/utimens.c 2007-05-31 08:37:17.000000000 +0200 +@@ -73,7 +73,7 @@ + Return 0 on success, -1 (setting errno) on failure. */ + + int +-futimens (int fd ATTRIBUTE_UNUSED, ++futimens_local (int fd ATTRIBUTE_UNUSED, + char const *file, struct timespec const timespec[2]) + { + /* There's currently no interface to set file timestamps with +@@ -166,5 +166,5 @@ + int + utimens (char const *file, struct timespec const timespec[2]) + { +- return futimens (-1, file, timespec); ++ return futimens_local (-1, file, timespec); + } +--- ./lib/utimens.h.orig 2007-05-31 08:37:07.000000000 +0200 ++++ ./lib/utimens.h 2007-05-31 08:37:20.000000000 +0200 +@@ -1,3 +1,3 @@ + #include "timespec.h" +-int futimens (int, char const *, struct timespec const [2]); ++int futimens_local (int, char const *, struct timespec const [2]); + int utimens (char const *, struct timespec const [2]); +--- ./src/misc.c.orig 2007-05-31 08:37:07.000000000 +0200 ++++ ./src/misc.c 2007-05-31 08:37:26.000000000 +0200 +@@ -518,7 +518,7 @@ + } + #endif + +- return futimens (fd, file, timespec); ++ return futimens_local (fd, file, timespec); + } + + /* A description of a working directory. */