1From fe88b59e4028952b4d157f0934e14b9eed058cd9 Mon Sep 17 00:00:00 2001
2From: Michael Forney <mforney@mforney.org>
3Date: Mon, 10 Jun 2019 01:47:01 -0700
4Subject: [PATCH] Only use __asm__ on GNU-compatible compilers
5
6---
7 lib/common/cpu.h | 2 +-
8 1 file changed, 1 insertion(+), 1 deletion(-)
9
10diff --git a/lib/common/cpu.h b/lib/common/cpu.h
11index 3f15d560..8d73a2ab 100644
12--- a/lib/common/cpu.h
13+++ b/lib/common/cpu.h
14@@ -118,7 +118,7 @@ MEM_STATIC ZSTD_cpuid_t ZSTD_cpuid(void) {
15 : "a"(7), "c"(0)
16 : "edx");
17 }
18-#elif defined(__x86_64__) || defined(_M_X64) || defined(__i386__)
19+#elif (defined(__x86_64__) || defined(_M_X64) || defined(__i386__)) && defined(__GNUC__)
20 U32 n;
21 __asm__("cpuid" : "=a"(n) : "a"(0) : "ebx", "ecx", "edx");
22 if (n >= 1) {
23--
242.45.2
25