From 917176e71ef901297e420bbb0db99be5e8100fc3 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Sat, 16 Apr 2011 14:24:38 +0200 Subject: utime[s]: avoid circular dependency utime.c: fix a cast, tv_sec is of type time_t Add stub for utimes. Signed-off-by: Peter S. Mazinger Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/common/utime.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libc/sysdeps/linux/common/utime.c') diff --git a/libc/sysdeps/linux/common/utime.c b/libc/sysdeps/linux/common/utime.c index 2573e00eb..ab63a24b2 100644 --- a/libc/sysdeps/linux/common/utime.c +++ b/libc/sysdeps/linux/common/utime.c @@ -12,7 +12,7 @@ #ifdef __NR_utime _syscall2(int, utime, const char *, file, const struct utimbuf *, times) -#else +#elif defined __NR_utimes /* alpha || ia64 */ # define __need_NULL # include # include @@ -24,11 +24,13 @@ int utime(const char *file, const struct utimbuf *times) if (times != NULL) { timevals[0].tv_usec = 0L; timevals[1].tv_usec = 0L; - timevals[0].tv_sec = (long int) times->actime; - timevals[1].tv_sec = (long int) times->modtime; + timevals[0].tv_sec = (time_t) times->actime; + timevals[1].tv_sec = (time_t) times->modtime; } return utimes(file, times ? timevals : NULL); } #endif +#if defined __NR_utime || defined __NR_utimes link_warning(utime, "the use of OBSOLESCENT `utime' is discouraged, use `utimes'") libc_hidden_def(utime) +#endif -- cgit v1.2.3