From f6437cfaed1dd0acd1ec63e1c282d0e7edfa4522 Mon Sep 17 00:00:00 2001 From: davidwed <davidwe@posteo.de> Date: 周六, 07 9月 2019 21:54:13 +0800 Subject: [PATCH] Fix a compilier error with msys2-mingw64 ( ld.exe: cannot find -ldl ) (#35) --- src/library/os/os-win.c | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/library/os/os-win.c b/src/library/os/os-win.c index e406ab9..a5a3bde 100644 --- a/src/library/os/os-win.c +++ b/src/library/os/os-win.c @@ -16,7 +16,7 @@ FUNCTION_RETURN result = FUNC_RET_ERROR; char buffer[MAX_COMPUTERNAME_LENGTH + 1]; int bufsize = MAX_COMPUTERNAME_LENGTH + 1; - BOOL cmpName = GetComputerName(buffer, &bufsize); + const BOOL cmpName = GetComputerName(buffer, &bufsize); if (cmpName) { strncpy(identifier, buffer, 6); result = FUNC_RET_OK; @@ -44,12 +44,12 @@ DWORD volSerial = 0; BOOL success; UINT driveType; - DWORD dwSize = MAX_PATH; + const DWORD dwSize = MAX_PATH; char szLogicalDrives[MAX_PATH] = { 0 }; unsigned char buf[8] = ""; FUNCTION_RETURN return_value; - DWORD dwResult = GetLogicalDriveStrings(dwSize, szLogicalDrives); + const DWORD dwResult = GetLogicalDriveStrings(dwSize, szLogicalDrives); if (dwResult > 0 && dwResult <= MAX_PATH) { return_value = FUNC_RET_OK; @@ -184,7 +184,7 @@ FUNCTION_RETURN getModuleName(char buffer[MAX_PATH]) { FUNCTION_RETURN result = FUNC_RET_OK; - DWORD wres = GetModuleFileName(NULL, buffer, MAX_PATH); + const DWORD wres = GetModuleFileName(NULL, buffer, MAX_PATH); if (wres == 0) { result = FUNC_RET_ERROR; } @@ -211,3 +211,11 @@ free(hashStr); } } + +/** + * Not implemented yet. + */ +VIRTUALIZATION getVirtualization() { + return NONE; +} + -- Gitblit v1.9.1