at 24.11-pre 1.2 kB view raw
1--- a/source/Plugins/Process/Linux/Procfs.h 2+++ b/source/Plugins/Process/Linux/Procfs.h 3@@ -10,6 +10,13 @@ 4 // sys/procfs.h on Android/Linux for all supported architectures. 5 6 #include <sys/ptrace.h> 7+#include <asm/ptrace.h> 8+ 9+// on i686 preprocessor symbols with these register names are defined as 10+// numeric constants; these symbols clash with identifier names used in 11+// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h` 12+#undef FS 13+#undef CS 14 15 #include "lldb/lldb-types.h" 16 17@@ -17,23 +24,13 @@ 18 19 #include <vector> 20 21-#ifdef __ANDROID__ 22-#if defined(__arm64__) || defined(__aarch64__) 23-typedef unsigned long elf_greg_t; 24-typedef elf_greg_t 25- elf_gregset_t[(sizeof(struct user_pt_regs) / sizeof(elf_greg_t))]; 26-typedef struct user_fpsimd_state elf_fpregset_t; 27-#ifndef NT_FPREGSET 28-#define NT_FPREGSET NT_PRFPREG 29-#endif // NT_FPREGSET 30-#elif defined(__mips__) 31-#ifndef NT_FPREGSET 32-#define NT_FPREGSET NT_PRFPREG 33-#endif // NT_FPREGSET 34-#endif 35-#else // __ANDROID__ 36+#if !defined(__GLIBC__) && defined(__powerpc__) 37+#define pt_regs musl_pt_regs 38+#include <sys/procfs.h> 39+#undef pt_regs 40+#else 41 #include <sys/procfs.h> 42-#endif // __ANDROID__ 43+#endif 44 45 namespace lldb_private { 46 namespace process_linux {