blob: 900f3596f83023d2ac9555d764227af960d4b0a0 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From a21e75da32c0016f1575ea29775565934a67660d Mon Sep 17 00:00:00 2001
2From: "Sergey V. Lobanov" <sergey@lobanov.in>
3Date: Sat, 5 Feb 2022 13:10:23 +0300
4Subject: [PATCH] Add cpuid compatibility header to build on non-x86 hosts
5
6Signed-off-by: Sergey V. Lobanov <sergey@lobanov.in>
7---
8 cpuid-compat/cpuid.h | 17 +++++++++++++++++
9 1 file changed, 17 insertions(+)
10 create mode 100644 cpuid-compat/cpuid.h
11
12--- /dev/null
13+++ b/cpuid-compat/cpuid.h
14@@ -0,0 +1,17 @@
15+// SPDX-License-Identifier: GPL-2.0-or-later
16+/*
17+ * cpuid compatibility header to build iucode-tool on non-x86 hosts
18+ *
19+ * Copyright (C) 2022 Sergey V. Lobanov <sergey@lobanov.in>
20+ */
21+
22+#ifdef __APPLE__
23+# include <limits.h>
24+#endif
25+
26+static __inline int __get_cpuid (unsigned int leaf,
27+ unsigned int *eax, unsigned int *ebx,
28+ unsigned int *ecx, unsigned int *edx)
29+{
30+ return 0;
31+}