Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Fix solaris build
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Mar 22, 2011
1 parent a4dad95 commit f63120b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/node_file.cc
Expand Up @@ -910,12 +910,17 @@ static Handle<Value> FUTimes(const Arguments& args) {
if (args[3]->IsFunction()) {
ASYNC_CALL(futime, args[3], fd, atime, mtime);
} else {
#ifdef __sun
// Solaris does not have futimes
return ThrowException(ErrnoException(ENOSYS, "futimes", "", 0));
#else
timeval times[2];

ToTimevals(atime, mtime, times);
if (futimes(fd, times) == -1) {
return ThrowException(ErrnoException(errno, "futimes", "", 0));
}
#endif //__sun
}

return Undefined();
Expand Down

0 comments on commit f63120b

Please sign in to comment.