diff --git a/src/unix/fs.c b/src/unix/fs.c index ecd2b239..6cabf513 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -176,7 +176,11 @@ skip: tv[0].tv_usec = (unsigned long)(req->atime * 1000000) % 1000000; tv[1].tv_sec = req->mtime; tv[1].tv_usec = (unsigned long)(req->mtime * 1000000) % 1000000; +# if defined(__sun) + return futimesat(req->file, NULL, tv); +# else return futimes(req->file, tv); +# endif #else errno = ENOSYS; return -1; diff --git a/src/unix/internal.h b/src/unix/internal.h index 5816be0e..4c8bdb53 100644 --- a/src/unix/internal.h +++ b/src/unix/internal.h @@ -39,7 +39,6 @@ #if defined(__sun) # include # include -# define futimes(fd, tv) futimesat(fd, (void*)0, tv) #endif /* __sun */ #if defined(__APPLE__) && !TARGET_OS_IPHONE