Tizen 2.0 Release
[external/tizen-coreutils.git] / packaging / coreutils-futimens.patch
1 --- coreutils-6.9/lib/utimens.h.futimens        2007-02-23 18:25:21.000000000 +0000
2 +++ coreutils-6.9/lib/utimens.h 2007-06-13 11:40:37.000000000 +0100
3 @@ -1,3 +1,3 @@
4  #include <time.h>
5 -int futimens (int, char const *, struct timespec const [2]);
6 +int gl_futimens (int, char const *, struct timespec const [2]);
7  int utimens (char const *, struct timespec const [2]);
8 --- coreutils-6.9/lib/utimens.c.futimens        2007-01-18 08:33:34.000000000 +0000
9 +++ coreutils-6.9/lib/utimens.c 2007-06-13 11:40:37.000000000 +0100
10 @@ -75,7 +75,7 @@ struct utimbuf
11     Return 0 on success, -1 (setting errno) on failure.  */
12  
13  int
14 -futimens (int fd ATTRIBUTE_UNUSED,
15 +gl_futimens (int fd ATTRIBUTE_UNUSED,
16           char const *file, struct timespec const timespec[2])
17  {
18    /* Some Linux-based NFS clients are buggy, and mishandle time stamps
19 @@ -185,5 +185,5 @@ futimens (int fd ATTRIBUTE_UNUSED,
20  int
21  utimens (char const *file, struct timespec const timespec[2])
22  {
23 -  return futimens (-1, file, timespec);
24 +  return gl_futimens (-1, file, timespec);
25  }
26 --- coreutils-6.9/src/copy.c.futimens   2007-06-13 11:56:44.000000000 +0100
27 +++ coreutils-6.9/src/copy.c    2007-06-13 11:57:00.000000000 +0100
28 @@ -547,7 +547,7 @@ copy_reg (char const *src_name, char con
29        timespec[0] = get_stat_atime (src_sb);
30        timespec[1] = get_stat_mtime (src_sb);
31  
32 -      if (futimens (dest_desc, dst_name, timespec) != 0)
33 +      if (gl_futimens (dest_desc, dst_name, timespec) != 0)
34         {
35           error (0, errno, _("preserving times for %s"), quote (dst_name));
36           if (x->require_preserve)
37 --- coreutils-6.9/src/touch.c.futimens  2007-06-13 11:58:00.000000000 +0100
38 +++ coreutils-6.9/src/touch.c   2007-06-13 11:58:06.000000000 +0100
39 @@ -182,7 +182,7 @@ touch (const char *file)
40        t = timespec;
41      }
42  
43 -  ok = (futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
44 +  ok = (gl_futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0);
45  
46    if (fd == STDIN_FILENO)
47      {