llvmPackages_15.lldb: fix the build on i686

as detailed within, adding `asm/ptrace.h` leads to `asm/ptrace-abi.h`
being included which defines preprocessor symbols that clash with
identifiers used in the LLVM headers (`FS` and `CS` only defined on
i686)
This commit is contained in:
Rahul Butani 2023-01-15 15:17:55 -08:00
parent 1d3ca42323
commit b4ee532f36
No known key found for this signature in database

View file

@ -1,14 +1,20 @@
--- a/source/Plugins/Process/Linux/Procfs.h
+++ b/source/Plugins/Process/Linux/Procfs.h
@@ -10,6 +10,7 @@
@@ -10,6 +10,13 @@
// sys/procfs.h on Android/Linux for all supported architectures.
#include <sys/ptrace.h>
+#include <asm/ptrace.h>
+
+// on i686 preprocessor symbols with these register names are defined as
+// numeric constants; these symbols clash with identifier names used in
+// `llvm/Support/VirtualFileSystem.h` and `llvm/ADT/SmallVector.h`
+#undef FS
+#undef CS
#include "lldb/lldb-types.h"
@@ -17,23 +18,13 @@
@@ -17,23 +24,13 @@
#include <vector>