Skip psapi.dll and go right to the Windows 7 or newer versions in kernel32.dll.
authorJay Krell <jaykrell@microsoft.com>
Thu, 29 Aug 2019 18:36:13 +0000 (11:36 -0700)
committerLarry Ewing <lewing@microsoft.com>
Wed, 4 Sep 2019 17:31:13 +0000 (12:31 -0500)
Commit migrated from https://github.com/mono/mono/commit/74f1312cd395dcb37d1123a5be6ea493c52a3053

src/mono/mono/eglib/gmodule-unix.c
src/mono/mono/eglib/gmodule-win32.c
src/mono/mono/eglib/test/module.c

index 77f8b8d..4c0d53c 100644 (file)
@@ -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 <windows.h>
 #include <psapi.h>
 
index 3d442c4..23e7b77 100644 (file)
  * 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 <config.h>
 #include <glib.h>
+#ifndef PSAPI_VERSION
+#define PSAPI_VERSION 2 // Use the Windows 7 or newer version more directly.
+#endif
 #include <windows.h>
 #include <psapi.h>
 #include <gmodule-win32-internals.h>
index 39e796c..5f2d672 100644 (file)
@@ -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 <windows.h>
 #include <wchar.h>
 #include <psapi.h>