← Commit list

cc8b6871a

Bernhard Reutner-Fischer
Bernhard Reutner-Fischer
2009-11-14
FAILED Duration: 33s

Subject

use utimes() rather than obsolescent utime()

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

archival/bbunzip.c+3 -5
@@ -105,15 +105,13 @@ int FAST_FUNC bbunpack(char **argv,
if (status >= 0) {
/* TODO: restore other things? */
if (info.mtime) {
- struct utimbuf times;
-
- times.actime = info.mtime;
- times.modtime = info.mtime;
+ struct timeval times = {.tv_sec = info.mtime,
+ .tv_usec = 0};
/* Note: we closed it first.
* On some systems calling utime
* then closing resets the mtime
* back to current time. */
- utime(new_name, &times); /* ignoring errors */
+ utimes(new_name, &times); /* ignoring errors */
}
/* Delete _compressed_ file */
include/libbb.h+0 -1
@@ -40,7 +40,6 @@
#include <termios.h>
#include <time.h>
#include <unistd.h>
-#include <utime.h>
/* Try to pull in PATH_MAX */
#include <limits.h>
#include <sys/param.h>