Fixed issued with mingw build

This commit is contained in:
Armin Novak 2022-02-17 15:18:18 +01:00 committed by akallabeth
parent bab45ff7da
commit bf9f1eccc1
7 changed files with 17 additions and 11 deletions

View File

@ -1329,7 +1329,7 @@ static UINT urb_control_get_interface_request(IUDEVICE* pdev, URBDRC_CHANNEL_CAL
{ {
size_t out_size; size_t out_size;
UINT32 InterfaceId, OutputBufferSize, usbd_status; UINT32 InterfaceId, OutputBufferSize, usbd_status;
UINT16 interface; UINT16 InterfaceNr;
wStream* out; wStream* out;
URBDRC_PLUGIN* urbdrc; URBDRC_PLUGIN* urbdrc;
const BOOL noAck = (RequestField & 0x80000000U) != 0; const BOOL noAck = (RequestField & 0x80000000U) != 0;
@ -1354,7 +1354,7 @@ static UINT urb_control_get_interface_request(IUDEVICE* pdev, URBDRC_CHANNEL_CAL
} }
InterfaceId = ((STREAM_ID_PROXY << 30) | pdev->get_ReqCompletion(pdev)); InterfaceId = ((STREAM_ID_PROXY << 30) | pdev->get_ReqCompletion(pdev));
Stream_Read_UINT16(s, interface); Stream_Read_UINT16(s, InterfaceNr);
Stream_Seek(s, 2); Stream_Seek(s, 2);
Stream_Read_UINT32(s, OutputBufferSize); Stream_Read_UINT32(s, OutputBufferSize);
if (OutputBufferSize > UINT32_MAX - 36) if (OutputBufferSize > UINT32_MAX - 36)
@ -1369,7 +1369,7 @@ static UINT urb_control_get_interface_request(IUDEVICE* pdev, URBDRC_CHANNEL_CAL
if (!pdev->control_transfer( if (!pdev->control_transfer(
pdev, RequestId, 0, 0, 0x80 | 0x01, 0x0A, /* REQUEST_GET_INTERFACE */ pdev, RequestId, 0, 0, 0x80 | 0x01, 0x0A, /* REQUEST_GET_INTERFACE */
0, interface, &usbd_status, &OutputBufferSize, Stream_Pointer(out), 1000)) 0, InterfaceNr, &usbd_status, &OutputBufferSize, Stream_Pointer(out), 1000))
{ {
WLog_Print(urbdrc->log, WLOG_DEBUG, "control_transfer failed"); WLog_Print(urbdrc->log, WLOG_DEBUG, "control_transfer failed");
Stream_Free(out, TRUE); Stream_Free(out, TRUE);

View File

@ -197,15 +197,15 @@ static const char* call_to_string_proxy(BOOL client, UINT32 interfaceId, UINT32
} }
} }
static const char* call_to_string_stub(BOOL client, UINT32 interfaceId, UINT32 functionId) static const char* call_to_string_stub(BOOL client, UINT32 interfaceNr, UINT32 functionId)
{ {
return "QUERY_DEVICE_TEXT_RSP [stub |client]"; return "QUERY_DEVICE_TEXT_RSP [stub |client]";
} }
const char* call_to_string(BOOL client, UINT32 interface, UINT32 functionId) const char* call_to_string(BOOL client, UINT32 interfaceNr, UINT32 functionId)
{ {
const UINT32 mask = (interface & STREAM_ID_MASK) >> 30; const UINT32 mask = (interfaceNr & STREAM_ID_MASK) >> 30;
const UINT32 interfaceId = interface & INTERFACE_ID_MASK; const UINT32 interfaceId = interfaceNr & INTERFACE_ID_MASK;
switch (mask) switch (mask)
{ {

View File

@ -34,7 +34,7 @@ extern "C"
const char* urb_function_string(UINT16 urb); const char* urb_function_string(UINT16 urb);
const char* mask_to_string(UINT32 mask); const char* mask_to_string(UINT32 mask);
const char* interface_to_string(UINT32 id); const char* interface_to_string(UINT32 id);
const char* call_to_string(BOOL client, UINT32 interface, UINT32 functionId); const char* call_to_string(BOOL client, UINT32 interfaceNr, UINT32 functionId);
void urbdrc_dump_message(wLog* log, BOOL client, BOOL write, wStream* s); void urbdrc_dump_message(wLog* log, BOOL client, BOOL write, wStream* s);

View File

@ -158,16 +158,18 @@ static void settings_client_load_hkey_local_machine(rdpSettings* settings)
settings_reg_query_dword(settings, FreeRDP_BitmapCacheV2NumCells, hKey, _T("NumCells")); settings_reg_query_dword(settings, FreeRDP_BitmapCacheV2NumCells, hKey, _T("NumCells"));
for (x = 0; x < 5; x++) for (x = 0; x < 5; x++)
{ {
DWORD val;
TCHAR numentries[64] = { 0 }; TCHAR numentries[64] = { 0 };
TCHAR persist[64] = { 0 }; TCHAR persist[64] = { 0 };
BITMAP_CACHE_V2_CELL_INFO cache = { 0 }; BITMAP_CACHE_V2_CELL_INFO cache = { 0 };
_sntprintf(numentries, ARRAYSIZE(numentries), _T("Cell%uNumEntries"), x); _sntprintf(numentries, ARRAYSIZE(numentries), _T("Cell%uNumEntries"), x);
_sntprintf(persist, ARRAYSIZE(persist), _T("Cell%uPersistent"), x); _sntprintf(persist, ARRAYSIZE(persist), _T("Cell%uPersistent"), x);
if (!settings_reg_query_dword_val(hKey, numentries, &cache.numEntries) || if (!settings_reg_query_dword_val(hKey, numentries, &val) ||
!settings_reg_query_bool_val(hKey, persist, &cache.persistent) || !settings_reg_query_bool_val(hKey, persist, &cache.persistent) ||
!freerdp_settings_set_pointer_array(settings, FreeRDP_BitmapCacheV2CellInfo, x, !freerdp_settings_set_pointer_array(settings, FreeRDP_BitmapCacheV2CellInfo, x,
&cache)) &cache))
WLog_WARN(TAG, "Failed to load registry keys to settings!"); WLog_WARN(TAG, "Failed to load registry keys to settings!");
cache.numEntries = val;
} }
settings_reg_query_bool(settings, FreeRDP_AllowCacheWaitingList, hKey, settings_reg_query_bool(settings, FreeRDP_AllowCacheWaitingList, hKey,

View File

@ -484,7 +484,7 @@ typedef SecPkgCredentials_NamesW* PSecPkgCredentials_NamesW;
#endif #endif
#if !defined(_WIN32) || defined(_UWP) || defined(__MINGW32__) #if !defined(_WIN32) || defined(_UWP) || !defined(__MINGW32__)
typedef struct typedef struct
{ {
UINT32 BindingsLength; UINT32 BindingsLength;

View File

@ -51,7 +51,7 @@
#include <limits.h> #include <limits.h>
#ifdef _WIN32 #if defined(_WIN32) || defined(__MINGW32__)
#include <wtypes.h> #include <wtypes.h>
/* Handle missing ssize_t on Windows */ /* Handle missing ssize_t on Windows */

View File

@ -89,6 +89,10 @@ enum
MsvAvSingleHost = MsvAvRestrictions MsvAvSingleHost = MsvAvRestrictions
}; };
#else
#ifndef MsvAvSingleHost
#define MsvAvSingleHost MsvAvRestrictions
#endif
#endif #endif
#else #else
typedef enum typedef enum