Use POSIX utime() instead of non-posix utimes()
authorTheodore Tso <tytso@mit.edu>
Fri, 15 Jul 1994 20:05:57 +0000 (20:05 +0000)
committerTheodore Tso <tytso@mit.edu>
Fri, 15 Jul 1994 20:05:57 +0000 (20:05 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3979 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/kdb/ChangeLog [new file with mode: 0644]
src/lib/kdb/kdb_dbm.c

diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog
new file mode 100644 (file)
index 0000000..f2b496d
--- /dev/null
@@ -0,0 +1,6 @@
+Fri Jul 15 14:54:10 1994  Theodore Y. Ts'o  (tytso at tsx-11)
+
+       * kdb_dbm.c (krb5_dbm_db_end_update): Change use of utimes() to
+       the POSIX utime() function.
+
+
index 5a6712f1d23f1eafd8423ecc528a1b01b2e2f1fd..9642ce289df9aa1ffafd9caa330c4b2550e66c49 100644 (file)
@@ -36,10 +36,8 @@ static char rcsid_krb_dbm_c[] =
 #include <krb5/sysincl.h>
 #include <stdio.h>
 #include <errno.h>
-
-#if (defined(mips) && defined(SYSTYPE_BSD43)) || defined(aix)
-#include <sys/time.h>
-#endif
+#include <sys/types.h>
+#include <utime.h>
 
 #if defined (POSIX_FILE_LOCKS) && !defined(unicos61)
 #include <fcntl.h>
@@ -381,16 +379,14 @@ time_t age;
        retval = errno;
     else {
        struct stat st;
-       struct timeval tv[2];
+       struct utimbuf times;
        /* only set the time if the new file is "newer" than
           "age" */
        if ((fstat (fd, &st) == 0) && (st.st_mtime <= age)) {
-           tv[0].tv_sec = st.st_atime;
-           tv[0].tv_usec = 0;
-           tv[1].tv_sec = age;         /* mod time */
-           tv[1].tv_usec = 0;
+           times.actime = st.st_atime;
+           times.modtime = age;
            /* set the mod timetimes.. */
-           utimes (new_okname, tv);
+           utime(new_okname, &times);
 #ifndef NOFSYNC
            fsync(fd);
 #endif