=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ftp/ftp.c,v retrieving revision 1.105 retrieving revision 1.106 diff -c -r1.105 -r1.106 *** src/usr.bin/ftp/ftp.c 2019/06/28 13:35:01 1.105 --- src/usr.bin/ftp/ftp.c 2019/10/15 01:24:07 1.106 *************** *** 1,4 **** ! /* $OpenBSD: ftp.c,v 1.105 2019/06/28 13:35:01 deraadt Exp $ */ /* $NetBSD: ftp.c,v 1.27 1997/08/18 10:20:23 lukem Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: ftp.c,v 1.106 2019/10/15 01:24:07 guenther Exp $ */ /* $NetBSD: ftp.c,v 1.27 1997/08/18 10:20:23 lukem Exp $ */ /* *************** *** 72,77 **** --- 72,78 ---- #include #include #include + #include #include #include #include *************** *** 79,85 **** #include #include #include - #include #include "ftp_var.h" --- 80,85 ---- *************** *** 1211,1221 **** if (preserve && (closefunc == fclose)) { mtime = remotemodtime(remote, 0); if (mtime != -1) { ! struct utimbuf ut; ! ut.actime = time(NULL); ! ut.modtime = mtime; ! if (utime(local, &ut) == -1) fprintf(ttyout, "Can't change modification time on %s to %s", local, asctime(localtime(&mtime))); --- 1211,1222 ---- if (preserve && (closefunc == fclose)) { mtime = remotemodtime(remote, 0); if (mtime != -1) { ! struct timespec times[2]; ! times[0].tv_nsec = UTIME_OMIT; ! times[1].tv_sec = mtime; ! times[1].tv_nsec = 0; ! if (utimensat(AT_FDCWD, local, times, 0) == -1) fprintf(ttyout, "Can't change modification time on %s to %s", local, asctime(localtime(&mtime)));