From: Josh Klontz Date: Tue, 17 Jul 2012 21:45:04 +0000 (-0400) Subject: MSVC2010 Error Fixes X-Git-Tag: v1.8.0~78^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bd1531a5c2d16cfac5709eeb98aab03a79d0933;p=yubikey-personalization MSVC2010 Error Fixes --- diff --git a/ykcore/ykcore.c b/ykcore/ykcore.c index 9427732..74ea1fb 100644 --- a/ykcore/ykcore.c +++ b/ykcore/ykcore.c @@ -486,7 +486,7 @@ int yk_read_response_from_key(YK_KEY *yk, uint8_t slot, unsigned int flags, /* The first part of the response was read by yk_wait_for_key_status(). We need * to copy it to buf. */ - memcpy(buf + *bytes_read, data, sizeof(data) - 1); + memcpy((char*)buf + *bytes_read, data, sizeof(data) - 1); *bytes_read += sizeof(data) - 1; while (*bytes_read + FEATURE_RPT_SIZE <= bufsize) { @@ -517,7 +517,7 @@ int yk_read_response_from_key(YK_KEY *yk, uint8_t slot, unsigned int flags, return 1; } - memcpy(buf + *bytes_read, data, sizeof(data) - 1); + memcpy((char*)buf + *bytes_read, data, sizeof(data) - 1); *bytes_read += sizeof(data) - 1; } else { /* Reset read mode of Yubikey before returning. */ diff --git a/ykcore/ykcore_windows.c b/ykcore/ykcore_windows.c index 796ce37..b08590f 100644 --- a/ykcore/ykcore_windows.c +++ b/ykcore/ykcore_windows.c @@ -32,6 +32,7 @@ #include "ykdef.h" #include "ykcore_backend.h" +#define INITGUID #include #include #include