Browse Source

Better ifdef for futimes

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
4cc0a0878f
  1. 6
      src/node_file.cc

6
src/node_file.cc

@ -910,8 +910,8 @@ static Handle<Value> FUTimes(const Arguments& args) {
if (args[3]->IsFunction()) { if (args[3]->IsFunction()) {
ASYNC_CALL(futime, args[3], fd, atime, mtime); ASYNC_CALL(futime, args[3], fd, atime, mtime);
} else { } else {
#ifdef __sun #ifndef futimes
// Solaris does not have futimes // Some systems do not have futimes
return ThrowException(ErrnoException(ENOSYS, "futimes", "", 0)); return ThrowException(ErrnoException(ENOSYS, "futimes", "", 0));
#else #else
timeval times[2]; timeval times[2];
@ -920,7 +920,7 @@ static Handle<Value> FUTimes(const Arguments& args) {
if (futimes(fd, times) == -1) { if (futimes(fd, times) == -1) {
return ThrowException(ErrnoException(errno, "futimes", "", 0)); return ThrowException(ErrnoException(errno, "futimes", "", 0));
} }
#endif //__sun #endif // futimes
} }
return Undefined(); return Undefined();

Loading…
Cancel
Save