summaryrefslogtreecommitdiff
path: root/emulators/qemu/files/patch-util_cpuinfo-ppc.c
blob: 1de34b02b0639fc462875efc36f14b6e8502347a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- util/cpuinfo-ppc.c.orig	2024-01-29 19:13:22 UTC
+++ util/cpuinfo-ppc.c
@@ -6,11 +6,17 @@
 #include "qemu/osdep.h"
 #include "host/cpuinfo.h"
 
-#include <asm/cputable.h>
 #ifdef CONFIG_GETAUXVAL
 # include <sys/auxv.h>
 #else
+# ifdef __linux__
+#  include <asm/cputable.h>
+# endif
 # include "elf.h"
+#endif
+
+#ifndef PPC_FEATURE2_ARCH_3_1
+# define PPC_FEATURE2_ARCH_3_1       0x00040000
 #endif
 
 unsigned cpuinfo;