$NetBSD: patch-ab,v 1.6 2025/04/21 16:13:17 wiz Exp $ --- arcdos.c.orig 2010-08-07 13:06:42.000000000 +0000 +++ arcdos.c @@ -31,7 +31,11 @@ #include #include #if BSD +#ifdef __linux__ +#include +#else #include +#endif #else #include /* Sys V. Bleah. */ #if NEED_TIMEVAL @@ -175,14 +179,14 @@ setstamp(f, date, time) /* set a file's struct tm tm; struct timeval tvp[2]; int utimes(); - long tmclock(); tm.tm_sec = (time & 31) * 2; tm.tm_min = (time >> 5) & 63; tm.tm_hour = (time >> 11); tm.tm_mday = date & 31; tm.tm_mon = ((date >> 5) & 15) - 1; tm.tm_year = (date >> 9) + 80; - tvp[0].tv_sec = tmclock(&tm); + tm.tm_isdst = -1; + tvp[0].tv_sec = mktime(&tm); tvp[1].tv_sec = tvp[0].tv_sec; tvp[0].tv_usec = tvp[1].tv_usec = 0; utimes(f, tvp);