0001-Only-use-__asm__-on-GNU-compatible-compilers.patch (800B)
1 From 7bc019c4c96b4eae8fe05dd31c4ea781441d437c Mon Sep 17 00:00:00 2001 2 From: Michael Forney <mforney@mforney.org> 3 Date: Mon, 10 Jun 2019 01:47:01 -0700 4 Subject: [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 10 diff --git a/lib/common/cpu.h b/lib/common/cpu.h 11 index cb210593..3c43f816 100644 12 --- a/lib/common/cpu.h 13 +++ b/lib/common/cpu.h 14 @@ -82,7 +82,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 -- 24 2.29.2 25