snwprintf is a Microsoft extension, and according to the MSVC spec,
it is called _snwprintf. MinGW defines both snwprintf and _snwprintf,
while MSVC defines only _snwprintf.
We can also use swprintf here. The only difference between
the two is the return value, and we are not using it. So change
the function to support MSVC build env.
Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com>
---
qga/commands-win32.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index c0bf3467bd..2bf5581aaa 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -1590,7 +1590,7 @@ static DWORD get_interface_index(const char *guid)
ULONG index;
DWORD status;
wchar_t wbuf[INTERFACE_PATH_BUF_SZ];
- snwprintf(wbuf, INTERFACE_PATH_BUF_SZ, L"\\device\\tcpip_%s", guid);
+ swprintf(wbuf, INTERFACE_PATH_BUF_SZ, L"\\device\\tcpip_%s", guid);
wbuf[INTERFACE_PATH_BUF_SZ - 1] = 0;
status = GetAdapterIndex (wbuf, &index);
if (status != NO_ERROR) {
--
2.52.0