From 9310c1fb44982fea5c678e8f2b2045619af9e4b7 Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Tue, 8 May 2012 08:30:30 +0000 Subject: Really fixed utime() --- src/htslib.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/htslib.c b/src/htslib.c index 18a8f4e..f801d6d 100644 --- a/src/htslib.c +++ b/src/htslib.c @@ -2698,15 +2698,16 @@ static time_t getGMT(struct tm *tm) { /* hey, time_t is local! */ int set_filetime(const char* file, struct tm* tm_time) { time_t t = getGMT(tm_time); if (t != (time_t) -1) { - struct utimbuf tim; + STRUCT_UTIMBUF tim; memset(&tim, 0, sizeof(tim)); tim.actime = tim.modtime = t; - return utime(file, &tim); + return UTIME(file, &tim); } return -1; } /* sets file time from RFC822 date+time, -1 if error*/ +/* Note: utf-8 */ int set_filetime_rfc822(const char* file, const char* date) { struct tm buffer; struct tm* tm_s = convert_time_rfc822(&buffer, date); -- cgit v1.2.3