Permalink
Browse files

getpid works on darwin and sunos (and other places as well)

  • Loading branch information...
1 parent 51b7774 commit d7d4e35459f0fa9107f1ed0f1630551859b12956 @erh erh committed Feb 18, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 bson/oid.cpp
View
@@ -31,7 +31,7 @@ namespace mongo {
unsigned pid;
#if defined(_WIN32)
pid = (unsigned short) GetCurrentProcessId();
-#elif defined(__linux__)
+#elif defined(__linux__) || defined(__APPLE__) || defined(__sunos__)
pid = (unsigned short) getpid();
#else
pid = (unsigned short) security.getNonce();

0 comments on commit d7d4e35

Please sign in to comment.