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

Commit 4cc0a08

Browse files
committed
Better ifdef for futimes
1 parent 7bff702 commit 4cc0a08

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/node_file.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -910,8 +910,8 @@ static Handle<Value> FUTimes(const Arguments& args) {
910910
if (args[3]->IsFunction()) {
911911
ASYNC_CALL(futime, args[3], fd, atime, mtime);
912912
} else {
913-
#ifdef __sun
914-
// Solaris does not have futimes
913+
#ifndef futimes
914+
// Some systems do not have futimes
915915
return ThrowException(ErrnoException(ENOSYS, "futimes", "", 0));
916916
#else
917917
timeval times[2];
@@ -920,7 +920,7 @@ static Handle<Value> FUTimes(const Arguments& args) {
920920
if (futimes(fd, times) == -1) {
921921
return ThrowException(ErrnoException(errno, "futimes", "", 0));
922922
}
923-
#endif //__sun
923+
#endif // futimes
924924
}
925925

926926
return Undefined();

0 commit comments

Comments
 (0)