Skip to content

Commit

Permalink
scripts: Add missing definition for __packed
Browse files Browse the repository at this point in the history
In linux-dom0 header files we are heavily using __packed compiler
attributes but it seems like it is not defined because these header
files are not pre-processed.

Add a workaround by adding definition of __packed in the generated
combined header file.

Signed-off-by: Jinank Jain <[email protected]>
  • Loading branch information
jinankjain authored and Jinank Jain committed Dec 3, 2024
1 parent 269bb2e commit ee0ba0b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/generate_binding.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def generate_unified_mshv_headers(kernel_hdr_path, hv_hdrs_path):
logging.debug("Start generating unified header file")

with open(f"{kernel_hdr_path}/combined_mshv.h", "w") as fp:
fp.write("#ifndef __packed\n")
fp.write("#define __packed __attribute__((__packed__))\n")
fp.write("#endif\n")
fp.write("typedef _Bool bool;\n")
data = ""

Expand Down

0 comments on commit ee0ba0b

Please sign in to comment.