diff --git a/cmake/modules/CompilerFlags.cmake b/cmake/modules/CompilerFlags.cmake index 8247486806..2da4999f58 100644 --- a/cmake/modules/CompilerFlags.cmake +++ b/cmake/modules/CompilerFlags.cmake @@ -144,8 +144,8 @@ else() # MSVC set(CMAKE_CXX_FLAGS_RELEASE "${FALCOSECURITY_LIBS_RELEASE_FLAGS}") # "_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR" enables a workaround for windows GH runner issue, see - # https://github.com/actions/runner-images/issues/10004 + # https://github.com/actions/runner-images/issues/10004 Also, define NOMINMAX globally. add_compile_definitions( - _HAS_STD_BYTE=0 WIN32_LEAN_AND_MEAN _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR + _HAS_STD_BYTE=0 WIN32_LEAN_AND_MEAN _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR NOMINMAX ) endif() diff --git a/userspace/libscap/scap_print_event.c b/userspace/libscap/scap_print_event.c index b6626ad792..ec2f279baf 100644 --- a/userspace/libscap/scap_print_event.c +++ b/userspace/libscap/scap_print_event.c @@ -17,10 +17,6 @@ limitations under the License. #include #include #if defined(_WIN32) -/* This prevents including when including Ws2tcpip.h */ -#ifndef NOMINMAX -#define NOMINMAX -#endif #include #else #include diff --git a/userspace/libsinsp/event.cpp b/userspace/libsinsp/event.cpp index 4b7370d24f..a100cca286 100644 --- a/userspace/libsinsp/event.cpp +++ b/userspace/libsinsp/event.cpp @@ -24,7 +24,6 @@ limitations under the License. #include #include #else -#define NOMINMAX #define localtime_r(a, b) (localtime_s(b, a) == 0 ? b : NULL) #endif diff --git a/userspace/libsinsp/filter_compare.cpp b/userspace/libsinsp/filter_compare.cpp index 7333e2d2aa..1e10864fcb 100644 --- a/userspace/libsinsp/filter_compare.cpp +++ b/userspace/libsinsp/filter_compare.cpp @@ -22,7 +22,6 @@ limitations under the License. #include #ifdef _WIN32 -#define NOMINMAX #pragma comment(lib, "Ws2_32.lib") #include #include diff --git a/userspace/libsinsp/parsers.cpp b/userspace/libsinsp/parsers.cpp index d14c8ebdf9..1aa65f0f5a 100644 --- a/userspace/libsinsp/parsers.cpp +++ b/userspace/libsinsp/parsers.cpp @@ -17,7 +17,6 @@ limitations under the License. */ #ifdef _WIN32 -#define NOMINMAX #include #else #include diff --git a/userspace/libsinsp/sinsp_inet.h b/userspace/libsinsp/sinsp_inet.h index a410fc0774..45ed0759e8 100644 --- a/userspace/libsinsp/sinsp_inet.h +++ b/userspace/libsinsp/sinsp_inet.h @@ -18,10 +18,6 @@ limitations under the License. #pragma once #if defined(_WIN32) -/* This prevents including when including Ws2tcpip.h */ -#ifndef NOMINMAX -#define NOMINMAX -#endif #include #else #include