From 239a93485c95faa5c5b4979b2d031f60b7b9681a Mon Sep 17 00:00:00 2001
From: r4sas <r4sas@i2pmail.org>
Date: Thu, 10 Aug 2023 03:25:01 +0300
Subject: [PATCH] [cpu] use __builtin_* only on x86 systems

Signed-off-by: r4sas <r4sas@i2pmail.org>
---
 libi2pd/CPU.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libi2pd/CPU.cpp b/libi2pd/CPU.cpp
index b1a47f0b..14c86dc5 100644
--- a/libi2pd/CPU.cpp
+++ b/libi2pd/CPU.cpp
@@ -17,6 +17,7 @@ namespace cpu
 
 	void Detect(bool AesSwitch, bool force)
 	{
+#if defined(__x86_64__) || defined(__i386__)
 		__builtin_cpu_init ();
 #if defined (_WIN32) && (WINVER == 0x0501) // WinXP
 		if (AesSwitch && force) { // only if forced
@@ -25,7 +26,7 @@ namespace cpu
 #endif
 			aesni = true;
 		}
-
+#endif
 		LogPrint(eLogInfo, "AESNI ", (aesni ? "enabled" : "disabled"));
 	}
 }