From f9f0aef1cb3980a09627c4b0eb89f00c41aa18f7 Mon Sep 17 00:00:00 2001 From: Rot127 Date: Tue, 15 Oct 2024 00:59:30 -0500 Subject: [PATCH] Fix #2509. Compatibility headers should always include the header in the same dir. --- include/capstone/arm64.h | 2 +- include/capstone/systemz_compatibility.h | 2 +- suite/auto-sync/src/autosync/HeaderPatcher.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/capstone/arm64.h b/include/capstone/arm64.h index 1bd386452c..6aea91e1e2 100644 --- a/include/capstone/arm64.h +++ b/include/capstone/arm64.h @@ -8,7 +8,7 @@ extern "C" { #endif -#include +#include "aarch64.h" #include "cs_operand.h" #include "platform.h" diff --git a/include/capstone/systemz_compatibility.h b/include/capstone/systemz_compatibility.h index e730039b85..b73587519c 100644 --- a/include/capstone/systemz_compatibility.h +++ b/include/capstone/systemz_compatibility.h @@ -9,7 +9,7 @@ extern "C" { #endif -#include +#include "systemz.h" #include "platform.h" #include "cs_operand.h" diff --git a/suite/auto-sync/src/autosync/HeaderPatcher.py b/suite/auto-sync/src/autosync/HeaderPatcher.py index b9b26dca3a..2f7444261f 100755 --- a/suite/auto-sync/src/autosync/HeaderPatcher.py +++ b/suite/auto-sync/src/autosync/HeaderPatcher.py @@ -254,7 +254,7 @@ def inject_v6_header(self, v6_lines: list[str]) -> list[str]: for line in v6_lines: if re.search(r"^#include", line): if not header_inserted: - output.append(f"#include \n") + output.append(f'#include "{self.v6_lower}.h"\n') header_inserted = True output.append(line) return output