]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
* NEWS: Added support for uclibc.
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 30 Aug 2008 18:29:55 +0000 (18:29 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 30 Aug 2008 18:29:55 +0000 (18:29 +0000)
* configure.in, libmisc/copydir.c: futimes() and lutimes() are not
standard. Check if they are implemented before using them. Do not
set the time of links if lutimes() does not exist, and use
utimes() as a replacement for futimes().

ChangeLog
NEWS
libmisc/copydir.c

index 74b1875e721288ef561a011554f6138b7cca8f4c..de35f9ee11bc7eca31713c51f3271cb269af749f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-08-26  Tobias  <tp@fonz.de>
+
+       * NEWS: Added support for uclibc.
+       * configure.in, libmisc/copydir.c: futimes() and lutimes() are not
+       standard. Check if they are implemented before using them. Do not
+       set the time of links if lutimes() does not exist, and use
+       utimes() as a replacement for futimes().
+
 2008-08-26  Nicolas François  <nicolas.francois@centraliens.net>
 
        * src/groupmems.c: Handle the options alphabetically.
diff --git a/NEWS b/NEWS
index 19500726f7566e31a979167a202922d71098cdcc..f8289067bd4cedaa887c011b5cd8cff977614a11 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -5,6 +5,7 @@ shadow-4.1.2.1 -> shadow-4.1.3                                          UNRELEASED
 *** general:
 - packaging
   * Added support for OpenPAM.
+  * Added support for uclibc.
 
 - gpasswd
   * Added support for long options --add (-a), --delete (-d),
index abcea4c19094be353104d48392f6e2d8278e9bbd..b887303c9cb28ea93eecf72567d046def8f56aad 100644 (file)
@@ -431,12 +431,14 @@ static int copy_symlink (const char *src, const char *dst,
                return -1;
        }
 
+#ifdef HAVE_LUTIMES
        /* 2007-10-18: We don't care about
         *  exit status of lutimes because
         *  it returns ENOSYS on many system
         *  - not implemented
         */
        lutimes (dst, mt);
+#endif
 
        return err;
 }
@@ -548,9 +550,15 @@ static int copy_file (const char *src, const char *dst,
 
        (void) close (ifd);
 
+#ifdef HAVE_FUTIMES
        if (futimes (ofd, mt) != 0) {
                return -1;
        }
+#else
+       if (utimes(dst, mt) != 0) {
+               return -1;
+       }
+#endif
 
        if (close (ofd) != 0) {
                return -1;