diff options
Diffstat (limited to 'meta/packages/coreutils/coreutils-6.9/futimens.patch')
-rw-r--r-- | meta/packages/coreutils/coreutils-6.9/futimens.patch | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/meta/packages/coreutils/coreutils-6.9/futimens.patch b/meta/packages/coreutils/coreutils-6.9/futimens.patch new file mode 100644 index 0000000000..953c2d17a9 --- /dev/null +++ b/meta/packages/coreutils/coreutils-6.9/futimens.patch | |||
@@ -0,0 +1,61 @@ | |||
1 | # coreutils uses gnulib which conflicts with newer libc header on futimens | ||
2 | # this patch simply renames coreutils futimes to avoid confliction | ||
3 | # | ||
4 | # Signed-off-by Kevin Tian <kevin.tian@intel.com>, 2010-08-18 | ||
5 | # (this patch is licensed under GPLv2) | ||
6 | |||
7 | diff --git a/lib/utimens.c b/lib/utimens.c | ||
8 | index 71bc510..ae870b8 100644 | ||
9 | --- a/lib/utimens.c | ||
10 | +++ b/lib/utimens.c | ||
11 | @@ -75,7 +75,7 @@ struct utimbuf | ||
12 | Return 0 on success, -1 (setting errno) on failure. */ | ||
13 | |||
14 | int | ||
15 | -futimens (int fd ATTRIBUTE_UNUSED, | ||
16 | +futimens_coreutils (int fd ATTRIBUTE_UNUSED, | ||
17 | char const *file, struct timespec const timespec[2]) | ||
18 | { | ||
19 | /* Some Linux-based NFS clients are buggy, and mishandle time stamps | ||
20 | @@ -185,5 +185,5 @@ futimens (int fd ATTRIBUTE_UNUSED, | ||
21 | int | ||
22 | utimens (char const *file, struct timespec const timespec[2]) | ||
23 | { | ||
24 | - return futimens (-1, file, timespec); | ||
25 | + return futimens_coreutils (-1, file, timespec); | ||
26 | } | ||
27 | diff --git a/lib/utimens.h b/lib/utimens.h | ||
28 | index 0097aaa..13fc45a 100644 | ||
29 | --- a/lib/utimens.h | ||
30 | +++ b/lib/utimens.h | ||
31 | @@ -1,3 +1,3 @@ | ||
32 | #include <time.h> | ||
33 | -int futimens (int, char const *, struct timespec const [2]); | ||
34 | +int futimens_coreutils (int, char const *, struct timespec const [2]); | ||
35 | int utimens (char const *, struct timespec const [2]); | ||
36 | diff --git a/src/copy.c b/src/copy.c | ||
37 | index 4bdb75c..04634f1 100644 | ||
38 | --- a/src/copy.c | ||
39 | +++ b/src/copy.c | ||
40 | @@ -518,7 +518,7 @@ copy_reg (char const *src_name, char const *dst_name, | ||
41 | timespec[0] = get_stat_atime (src_sb); | ||
42 | timespec[1] = get_stat_mtime (src_sb); | ||
43 | |||
44 | - if (futimens (dest_desc, dst_name, timespec) != 0) | ||
45 | + if (futimens_coreutils (dest_desc, dst_name, timespec) != 0) | ||
46 | { | ||
47 | error (0, errno, _("preserving times for %s"), quote (dst_name)); | ||
48 | if (x->require_preserve) | ||
49 | diff --git a/src/touch.c b/src/touch.c | ||
50 | index a79c26d..6ef317d 100644 | ||
51 | --- a/src/touch.c | ||
52 | +++ b/src/touch.c | ||
53 | @@ -182,7 +182,7 @@ touch (const char *file) | ||
54 | t = timespec; | ||
55 | } | ||
56 | |||
57 | - ok = (futimens (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0); | ||
58 | + ok = (futimens_coreutils (fd, (fd == STDOUT_FILENO ? NULL : file), t) == 0); | ||
59 | |||
60 | if (fd == STDIN_FILENO) | ||
61 | { | ||