diff options
author | Jack Lloyd <[email protected]> | 2016-08-29 10:56:48 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-08-29 10:56:48 -0400 |
commit | 107fc6d4c2f0736f20931cbfb4440b0be1c49855 (patch) | |
tree | 4c858d5573c5f54a22a3342a79f2d83b02c24b90 | |
parent | b3289425e59941c33643f0cf190f42ee443e022e (diff) |
Fix get_process_id for MinGW
-rw-r--r-- | src/lib/utils/os_utils.cpp | 4 |
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"); |