aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2016-08-29 10:56:48 -0400
committerJack Lloyd <[email protected]>2016-08-29 10:56:48 -0400
commit107fc6d4c2f0736f20931cbfb4440b0be1c49855 (patch)
tree4c858d5573c5f54a22a3342a79f2d83b02c24b90
parentb3289425e59941c33643f0cf190f42ee443e022e (diff)
Fix get_process_id for MinGW
-rw-r--r--src/lib/utils/os_utils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/utils/os_utils.cpp b/src/lib/utils/os_utils.cpp
index 33bcf3cff..eab509984 100644
--- a/src/lib/utils/os_utils.cpp
+++ b/src/lib/utils/os_utils.cpp
@@ -19,7 +19,7 @@
#include <unistd.h>
#endif
-#if defined(BOTAN_TARGET_OS_IS_WINDOWS)
+#if defined(BOTAN_TARGET_OS_IS_WINDOWS) || defined(BOTAN_TARGET_OS_IS_MINGW)
#include <windows.h>
#endif
@@ -31,7 +31,7 @@ uint32_t get_process_id()
{
#if defined(BOTAN_TARGET_OS_TYPE_IS_UNIX)
return ::getpid();
-#elif defined(BOTAN_TARGET_OS_IS_WINDOWS)
+#elif defined(BOTAN_TARGET_OS_IS_WINDOWS) || defined(BOTAN_TARGET_OS_IS_MINGW)
return ::GetCurrentProcessId();
#else
throw Exception("get_process_id not supported");