mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
src: define getpid() based on OS
94b9948 added unistd.h to src/env.cc in order to use getpid().
However, this doesn't exist on Windows. This commit conditionally
defines getpid() based on the OS.
Fixes: https://github.com/nodejs/node/issues/4145
PR-URL: https://github.com/nodejs/node/pull/4146
Reviewed-By: Brian White <mscdex@mscdex.net>
This commit is contained in:
1 parent
5c6aac4d27
commit
a9c0c65f9e
1 file changed
+7
-1
+7
-1
@@ -1,7 +1,13 @@
|
||||
#include "env.h"
|
||||
#include "env-inl.h"
|
||||
#include "v8.h"
|
||||
#include "unistd.h"
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define getpid GetCurrentProcessId
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
namespace node {
|
||||
|
||||
Reference in new issue
Block a user