Fix futimes() regression

Fixes #647
This commit is contained in:
Justine Tunney 2022-10-05 19:25:07 -07:00
parent f155205eb0
commit 81ee11a16e
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
22 changed files with 200 additions and 138 deletions

View file

@ -17,16 +17,16 @@
PERFORMANCE OF THIS SOFTWARE.
*/
#include "libc/calls/struct/timeval.h"
#include "libc/str/str.h"
#include "libc/sysv/consts/at.h"
#include "libc/time/struct/utimbuf.h"
/**
* Changes last accessed/modified times on file.
*
* @param times if NULL means now
* @return 0 on success or -1 w/ errno
* @return 0 on success, or -1 w/ errno
* @see utimensat() for modern version
* @asyncsignalsafe
* @threadsafe
*/
int utime(const char *path, const struct utimbuf *times) {
struct timeval tv[2];