summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedor Indutny <fedor.indutny@gmail.com>2014-01-23 15:21:03 +0400
committerFedor Indutny <fedor.indutny@gmail.com>2014-01-28 12:38:02 +0400
commiteaf76648a6ba05932465fdb2478a16ca4b6c17a6 (patch)
treea6b7969adfbc8edec70a24d759e2b9e3922caa57
parent114bff467eb67def0dbe3baddf06969bcadd0ecc (diff)
downloadnode-new-eaf76648a6ba05932465fdb2478a16ca4b6c17a6.tar.gz
node: explicitly include `sys/types.h` for size_t
fix #6724
-rw-r--r--src/node.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/node.h b/src/node.h
index 0dc21c33a4..677a24f43d 100644
--- a/src/node.h
+++ b/src/node.h
@@ -61,6 +61,14 @@
#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 {