summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/legacy/futimes.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/legacy/futimes.c b/src/legacy/futimes.c
index d81d83a9..1c19eb1f 100644
--- a/src/legacy/futimes.c
+++ b/src/legacy/futimes.c
@@ -5,6 +5,7 @@
int futimes(int fd, const struct timeval tv[2])
{
struct timespec times[2];
+ if (!tv) return futimens(fd, 0);
times[0].tv_sec = tv[0].tv_sec;
times[0].tv_nsec = tv[0].tv_usec * 1000;
times[1].tv_sec = tv[1].tv_sec;