node: explicitly include `sys/types.h` for size_t
authorFedor Indutny <fedor.indutny@gmail.com>
Thu, 23 Jan 2014 11:21:03 +0000 (15:21 +0400)
committerFedor Indutny <fedor.indutny@gmail.com>
Tue, 28 Jan 2014 08:38:02 +0000 (12:38 +0400)
fix #6724

src/node.h

index 0dc21c3..677a24f 100644 (file)
 #include "v8.h"  // NOLINT(build/include_order)
 #include "node_version.h"  // NODE_MODULE_VERSION
 
+#ifdef _WIN32
+# include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
+typedef SIZE_T size_t;
+#else  // !_WIN32
+# include <sys/types.h>  // size_t, ssize_t
+#endif  // _WIN32
+
 // Forward-declare these functions now to stop MSVS from becoming
 // terminally confused when it's done in node_internals.h
 namespace node {