2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Add check for 2-argument form of timespecsub (FreeBSD and BSD/OS) and

fix a typo in the gettimeofday check.
This commit is contained in:
Todd C. Miller
2004-11-25 17:09:31 +00:00
parent 94f606fbf6
commit 33db4b2edb
5 changed files with 84 additions and 106 deletions

View File

@@ -294,7 +294,11 @@ int sudo_edit(argc, argv)
* If mtime and size match but the user spent no measurable
* time in the editor we can't tell if the file was changed.
*/
#ifdef HAVE_TIMESPECSUB2
timespecsub(&ts1, &ts2);
#else
timespecsub(&ts1, &ts2, &ts2);
#endif
if (timespecisset(&ts2)) {
warningx("%s unchanged", tf[i].ofile);
unlink(tf[i].tfile);