From 493f4542050604e0030a2e7cbf3726a557037fb2 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Mon, 22 May 1995 20:57:49 +0000 Subject: [PATCH] Use the POSIX utime instead of utimes. (For hpux) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5847 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kdb4/ChangeLog | 4 ++++ src/lib/kdb4/krb_dbm.c | 11 +++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/lib/kdb4/ChangeLog b/src/lib/kdb4/ChangeLog index f27dddc80..8db77f9f8 100644 --- a/src/lib/kdb4/ChangeLog +++ b/src/lib/kdb4/ChangeLog @@ -1,3 +1,7 @@ +Mon May 22 15:14:17 1995 Ezra Peisach + + * krb_dbm.c (kerb_end_update): Use the POSIX utime instead of utimes. + Fri Apr 28 16:24:20 1995 Theodore Y. Ts'o * configure.in: Add check for KRB5_POSIX_LOCKS diff --git a/src/lib/kdb4/krb_dbm.c b/src/lib/kdb4/krb_dbm.c index bf3ede81f..7dfb6bcef 100644 --- a/src/lib/kdb4/krb_dbm.c +++ b/src/lib/kdb4/krb_dbm.c @@ -21,6 +21,7 @@ /* before krb_db.h */ #include #include +#include #ifdef NDBM #include @@ -246,16 +247,14 @@ static long kerb_end_update(db_name, age) retval = errno; else { struct stat st; - struct timeval tv[2]; + struct utimbuf times; /* make sure that semaphore is "after" previous value. */ 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; - tv[1].tv_usec = 0; + times.actime = st.st_atime; + times.modtime = age; /* set times.. */ - utimes (new_okname, tv); + utime (new_okname, ×); #ifndef NO_FSYNC fsync(fd); #endif -- 2.26.2