diff -ur a/Contrib/Makensisw/wndspy.cpp b/Contrib/Makensisw/wndspy.cpp
--- a/Contrib/Makensisw/wndspy.cpp	2023-05-22 06:35:05.000000000 +0800
+++ b/Contrib/Makensisw/wndspy.cpp	2024-05-28 18:31:14.491400700 +0800
@@ -268,7 +268,7 @@
   SetDlgItemText(hDlg, IDC_WNDINFO, hWnd ? buf : NULL);
 
   UINT dpi = DPI::GetDpiForWindow(hWnd), mondpi = DPI::GetDpiForMonitor(hWnd);
-#ifndef _M_ARM64 // Not i386, AMD64 nor ARM(32-bit)
+#if !defined(_M_ARM64) && !defined(__aarch64__) // Not i386, AMD64 nor ARM(32-bit)
   if (!dpi)
   {
     OSVERSIONINFO osv;
diff -ur a/Contrib/System/Source/System.h b/Contrib/System/Source/System.h
--- a/Contrib/System/Source/System.h	2021-12-31 09:41:06.000000000 +0800
+++ b/Contrib/System/Source/System.h	2024-05-28 18:20:03.798858700 +0800
@@ -7,7 +7,7 @@
 #  define SYSTEM_AMD64
 #elif defined(_M_IX86) || defined(__i386__) || defined(_X86_)
 #  define SYSTEM_X86
-#elif defined(_M_ARM64)
+#elif defined(_M_ARM64) || defined(__aarch64__)
 #  define SYSTEM_ARM64
 #else
 #  error "Unknown architecture!"
diff -ur a/Source/build.cpp b/Source/build.cpp
--- a/Source/build.cpp	2023-07-28 01:18:23.000000000 +0800
+++ b/Source/build.cpp	2024-05-28 18:20:54.069482400 +0800
@@ -133,7 +133,7 @@
 #ifdef _WIN32
   if (sizeof(void*) > 4) m_target_type = TARGET_AMD64; // BUGBUG: scons 'TARGET_ARCH' should specify the default
 #endif
-#ifdef _M_ARM64
+#if defined(_M_ARM64) || defined(__aarch64__)
   m_target_type = TARGET_ARM64; // BUGBUG: scons 'TARGET_ARCH' should specify the default
 #endif
   build_unicode=TARGET_X86ANSI != m_target_type;
