[klibc] Fix implementation of utimes
authorBenjamin Gwin <bgwin@google.com>
Fri, 10 Dec 2021 00:42:36 +0000 (16:42 -0800)
committerBen Hutchings <benh@debian.org>
Sun, 26 Dec 2021 23:17:05 +0000 (23:17 +0000)
commite4560adac5117929a85637161db37feb3c0ba29f
tree200b6e1f99e4008de9c4da56d4dd78aacd13e845
parent8d9f4e0d6e18cae5174bb26f16655a7eb50f4f01
[klibc] Fix implementation of utimes

Origin: https://git.kernel.org/pub/scm/libs/klibc/klibc.git/commit/?id=a13b588a915d3a4498bf342d85524eb7dde71594

This was not correctly initializing the timespec array before passing it
on to utimensat.

Tested: Built cpio and extracted an image with `cpio -im` to preserve
mtime. The calls to utime now pass through the correct timestamps.

Signed-off-by: Benjamin Gwin <bgwin@google.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Gbp-Pq: Name klibc-fix-implementation-of-utimes.patch
usr/klibc/utimes.c