~ubuntu-branches/ubuntu/lucid/rsync/lucid

« back to all changes in this revision

Viewing changes to debian/patches/ignore-lutimes-ENOSYS-error.patch

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2008-05-16 11:48:01 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20080516114801-8fst7axz33g63wxk
Tags: 3.0.2-2ubuntu1
* Merge from debian unstable, remaining changes:
  - Remove stop links from rc0 and rc6 
    (and use update-rc.d multiuser instead of defaults). (TearDown spec)
  - depend on sysv-rc to accomodate the TearDown changes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From: Wayne Davison <wayned@samba.org>
2
 
Date: Sun, 12 Nov 2006 21:18:26 +0000 (+0000)
3
 
Subject: Ignore a time-setting error on a symlink (which is only attempted
4
 
X-Git-Tag: v3.0.0pre1~576
5
 
X-Git-Url: http://git.samba.org/?p=rsync.git;a=commitdiff_plain;h=149a78e33f1632c8a3bdd00e10aecf69c8d5608d;hp=88897638a98d39721a059e44ebcbcdcdcaf80df1
6
 
 
7
 
Ignore a time-setting error on a symlink (which is only attempted
8
 
on a system with lutimes() anyway).
9
 
---
10
 
 
11
 
diff --git a/util.c b/util.c
12
 
index 540fdf5..fc77219 100644
13
 
--- a/util.c
14
 
+++ b/util.c
15
 
@@ -145,8 +145,10 @@ int set_modtime(char *fname, time_t modtime, mode_t mode)
16
 
                t[1].tv_sec = modtime;
17
 
                t[1].tv_usec = 0;
18
 
 # ifdef HAVE_LUTIMES
19
 
-               if (S_ISLNK(mode))
20
 
-                       return lutimes(fname, t);
21
 
+               if (S_ISLNK(mode)) {
22
 
+                       lutimes(fname, t);
23
 
+                       return 0; /* ignore errors */
24
 
+               }
25
 
 # endif
26
 
                return utimes(fname, t);
27
 
 #elif defined HAVE_UTIMBUF