diff options
Diffstat (limited to 'trans/fakeroot.c')
-rw-r--r-- | trans/fakeroot.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/trans/fakeroot.c b/trans/fakeroot.c index 6f1cd748..c1102343 100644 --- a/trans/fakeroot.c +++ b/trans/fakeroot.c @@ -1,5 +1,5 @@ /* fakeroot -- a translator for faking actions that aren't really permitted - Copyright (C) 2002, 2003 Free Software Foundation, Inc. + Copyright (C) 2002, 2003, 2008 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as @@ -502,22 +502,26 @@ error_t netfs_attempt_utimes (struct iouser *cred, struct node *np, struct timespec *atime, struct timespec *mtime) { - struct timeval a, m; + union tv + { + struct timeval tv; + time_value_t tvt; + }; + union tv a, m; if (atime) { - TIMESPEC_TO_TIMEVAL (&a, atime); + TIMESPEC_TO_TIMEVAL (&a.tv, atime); } else - a.tv_sec = a.tv_usec = -1; + a.tv.tv_sec = a.tv.tv_usec = -1; if (mtime) { - TIMESPEC_TO_TIMEVAL (&m, mtime); + TIMESPEC_TO_TIMEVAL (&m.tv, mtime); } else - m.tv_sec = m.tv_usec = -1; + m.tv.tv_sec = m.tv.tv_usec = -1; - return file_utimes (np->nn->file, - *(time_value_t *) &a, *(time_value_t *) &m); + return file_utimes (np->nn->file, a.tvt, m.tvt); } error_t |