From 4ddfd8aa42c365a2351d9cbe2f98470fb81a8c41 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 9 Dec 2009 10:32:19 +0100 Subject: [PATCH] Fix posix.statSync() --- src/node_file.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/node_file.cc b/src/node_file.cc index 19ddb0e67bd..12890643233 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -172,10 +172,10 @@ static Handle Stat(const Arguments& args) { if (args[1]->IsFunction()) { ASYNC_CALL(stat, args[1], *path) } else { - struct stat *s; - int ret = stat(*path, s); + struct stat s; + int ret = stat(*path, &s); if (ret != 0) return ThrowException(errno_exception(errno)); - return scope.Close(BuildStatsObject(s)); + return scope.Close(BuildStatsObject(&s)); } }