mirror of
https://github.com/Stichting-MINIX-Research-Foundation/pkgsrc-ng.git
synced 2025-09-07 19:30:47 -04:00
36 lines
884 B
Plaintext
36 lines
884 B
Plaintext
$NetBSD: patch-ae,v 1.3 2009/04/25 23:46:47 gdt Exp $
|
|
|
|
--- nixtime.i.orig 1991-07-16 17:53:46.000000000 +0200
|
|
+++ nixtime.i
|
|
@@ -1,3 +1,6 @@
|
|
+#include <time.h>
|
|
+#include <sys/time.h>
|
|
+
|
|
#ifndef LINT
|
|
static char nixtimeid[]="@(#) nixtime.i 2.3 88/01/24 12:49:28";
|
|
#endif /* LINT */
|
|
@@ -35,7 +38,7 @@ unsigned *date, *time;
|
|
*time = tm->tm_sec / 2 + (tm->tm_min << 5) +
|
|
(tm->tm_hour << 11);
|
|
}
|
|
-
|
|
+ return 0;
|
|
}
|
|
|
|
/*****************
|
|
@@ -51,9 +54,11 @@ unsigned int date, time;
|
|
{
|
|
long mstonix();
|
|
long gettz();
|
|
- long utimbuf[2];
|
|
- utimbuf[0] = utimbuf[1] = gettz() + mstonix (date, time);
|
|
- return (utime (path, utimbuf));
|
|
+ long t = mstonix (date, time);
|
|
+ struct timeval times[2];
|
|
+ times[0].tv_sec = times[1].tv_sec = t + gettz(t);
|
|
+ times[0].tv_usec = times[1].tv_usec = 0;
|
|
+ return utimes(path, times);
|
|
}
|
|
|
|
/****************
|