From: Ryan Dahl Date: Tue, 22 Mar 2011 20:18:57 +0000 (-0700) Subject: Better ifdef for futimes X-Git-Tag: v0.5.0~176 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4cc0a0878fb0b31547c9a8d27e31f1daceb49524;p=platform%2Fupstream%2Fnodejs.git Better ifdef for futimes --- diff --git a/src/node_file.cc b/src/node_file.cc index 7889597f0..8b7f37419 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -910,8 +910,8 @@ static Handle FUTimes(const Arguments& args) { if (args[3]->IsFunction()) { ASYNC_CALL(futime, args[3], fd, atime, mtime); } else { -#ifdef __sun - // Solaris does not have futimes +#ifndef futimes + // Some systems do not have futimes return ThrowException(ErrnoException(ENOSYS, "futimes", "", 0)); #else timeval times[2]; @@ -920,7 +920,7 @@ static Handle FUTimes(const Arguments& args) { if (futimes(fd, times) == -1) { return ThrowException(ErrnoException(errno, "futimes", "", 0)); } -#endif //__sun +#endif // futimes } return Undefined();