From abbd7b2f4255d61aaf562600344256855c43fdbd Mon Sep 17 00:00:00 2001 From: Eduardo Arias Date: Tue, 23 Apr 2024 12:40:47 -0300 Subject: [PATCH] Replaced usage of apr_snprintf with snprintf (already in Windows exclusive code block) - updated included headers to support compilation on Windows (using Visual C++) --- src/unique_id.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/unique_id.cc b/src/unique_id.cc index a78ebd75..c6234112 100644 --- a/src/unique_id.cc +++ b/src/unique_id.cc @@ -17,6 +17,7 @@ #include "src/config.h" #ifdef WIN32 +#include "src/compat/msvc.h" #include #include #endif @@ -48,7 +49,11 @@ #endif #include +#ifndef WIN32 #include +#else +#include +#endif #include #include "src/utils/sha1.h" @@ -207,7 +212,7 @@ std::string UniqueId::ethernetMacAddress() { pAdapter = pAdapterInfo; while (pAdapter && !mac[0] && !mac[1] && !mac[2]) { if (pAdapter->AddressLength > 4) { - apr_snprintf(mac, MAC_ADDRESS_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x", + snprintf(mac, MAC_ADDRESS_SIZE, "%02x:%02x:%02x:%02x:%02x:%02x", (unsigned char)pAdapter->Address[0], (unsigned char)pAdapter->Address[1], (unsigned char)pAdapter->Address[2],