From f58e906fc654e7f788bd2e11fb8da16f83f01a60 Mon Sep 17 00:00:00 2001 From: Jay Krell Date: Thu, 29 Aug 2019 11:36:13 -0700 Subject: [PATCH] Skip psapi.dll and go right to the Windows 7 or newer versions in kernel32.dll. Commit migrated from https://github.com/mono/mono/commit/74f1312cd395dcb37d1123a5be6ea493c52a3053 --- src/mono/mono/eglib/gmodule-unix.c | 3 +++ src/mono/mono/eglib/gmodule-win32.c | 4 ++++ src/mono/mono/eglib/test/module.c | 3 +++ 3 files changed, 10 insertions(+) diff --git a/src/mono/mono/eglib/gmodule-unix.c b/src/mono/mono/eglib/gmodule-unix.c index 77f8b8d..4c0d53c 100644 --- a/src/mono/mono/eglib/gmodule-unix.c +++ b/src/mono/mono/eglib/gmodule-unix.c @@ -100,6 +100,9 @@ g_module_close (GModule *module) } #elif defined (G_OS_WIN32) +#ifndef PSAPI_VERSION +#define PSAPI_VERSION 2 // Use the Windows 7 or newer version more directly. +#endif #include #include diff --git a/src/mono/mono/eglib/gmodule-win32.c b/src/mono/mono/eglib/gmodule-win32.c index 3d442c4..23e7b77 100644 --- a/src/mono/mono/eglib/gmodule-win32.c +++ b/src/mono/mono/eglib/gmodule-win32.c @@ -28,8 +28,12 @@ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ + #include #include +#ifndef PSAPI_VERSION +#define PSAPI_VERSION 2 // Use the Windows 7 or newer version more directly. +#endif #include #include #include diff --git a/src/mono/mono/eglib/test/module.c b/src/mono/mono/eglib/test/module.c index 39e796c..5f2d672 100644 --- a/src/mono/mono/eglib/test/module.c +++ b/src/mono/mono/eglib/test/module.c @@ -15,6 +15,9 @@ #endif #if _WIN32 +#ifndef PSAPI_VERSION +#define PSAPI_VERSION 2 // Use the Windows 7 or newer version more directly. +#endif #include #include #include -- 2.7.4