diff options
Diffstat (limited to 'deps/uv/src/unix/fs.c')
-rw-r--r-- | deps/uv/src/unix/fs.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/deps/uv/src/unix/fs.c b/deps/uv/src/unix/fs.c index 8936ad9d83..085970a06d 100644 --- a/deps/uv/src/unix/fs.c +++ b/deps/uv/src/unix/fs.c @@ -33,6 +33,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <limits.h> /* PATH_MAX */ #include <sys/types.h> #include <sys/socket.h> @@ -205,6 +206,13 @@ skip: # else return futimes(req->file, tv); # endif +#elif defined(_AIX71) + struct timespec ts[2]; + ts[0].tv_sec = req->atime; + ts[0].tv_nsec = (unsigned long)(req->atime * 1000000) % 1000000 * 1000; + ts[1].tv_sec = req->mtime; + ts[1].tv_nsec = (unsigned long)(req->mtime * 1000000) % 1000000 * 1000; + return futimens(req->file, ts); #else errno = ENOSYS; return -1; @@ -362,9 +370,10 @@ out: if (dents != NULL) { int i; + /* Memory was allocated using the system allocator, so use free() here. */ for (i = 0; i < n; i++) - uv__free(dents[i]); - uv__free(dents); + free(dents[i]); + free(dents); } errno = saved_errno; @@ -383,7 +392,7 @@ static ssize_t uv__fs_pathmax_size(const char* path) { #if defined(PATH_MAX) return PATH_MAX; #else - return 4096; +#error "PATH_MAX undefined in the current platform" #endif } |