From d77b76d0f5c1842a4ffb4c70aabe7a1530e72631 Mon Sep 17 00:00:00 2001 From: Aleksey Kliger Date: Fri, 19 Apr 2024 14:25:12 -0400 Subject: [PATCH] fix Alpine build break Apline defines NULL as std::nullptr which is not comparable/assignable with intptr_t Fixes https://github.com/dotnet/source-build/issues/4345 --- src/coreclr/debug/daccess/cdac.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/coreclr/debug/daccess/cdac.cpp b/src/coreclr/debug/daccess/cdac.cpp index 78625bf67f2d72..23478592371a16 100644 --- a/src/coreclr/debug/daccess/cdac.cpp +++ b/src/coreclr/debug/daccess/cdac.cpp @@ -48,7 +48,7 @@ CDAC::CDAC(HMODULE module, uint64_t descriptorAddr, ICorDebugDataTarget* target) { if (m_module == NULL) { - m_cdac_handle = NULL; + m_cdac_handle = 0; return; } @@ -62,7 +62,7 @@ CDAC::CDAC(HMODULE module, uint64_t descriptorAddr, ICorDebugDataTarget* target) CDAC::~CDAC() { - if (m_cdac_handle != NULL) + if (m_cdac_handle) { decltype(&cdac_reader_free) free = reinterpret_cast(::GetProcAddress(m_module, "cdac_reader_free")); _ASSERTE(free != nullptr);