]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
Issue #919: Fix build on non-x86 windows. Patch thanks to @dotanbrk
authorEric Hawicz <erh+git@nimenees.com>
Thu, 19 Feb 2026 23:48:05 +0000 (18:48 -0500)
committerEric Hawicz <erh+git@nimenees.com>
Thu, 19 Feb 2026 23:48:05 +0000 (18:48 -0500)
random_seed.c

index a93c8b979a1f1bca2ff4f8b9dbcde3734bbd7882..0ea57e06787e0259384b3f3f0da6238f28903e7e 100644 (file)
@@ -46,7 +46,7 @@ static void do_cpuid(int regs[], int h)
        /* clang-format on */
 }
 
-#elif defined _MSC_VER
+#elif defined _MSC_VER && (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64))
 
 #define HAS_X86_CPUID 1
 #define do_cpuid __cpuid
@@ -129,7 +129,7 @@ static int get_rdrand_seed(void)
 
 #endif
 
-#if defined _MSC_VER
+#if defined _MSC_VER && (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86) || defined(_M_X64))
 
 #if _MSC_VER >= 1700
 #define HAVE_RDRAND 1