From 13f7fa3b823b1b5d87fdb462e67219494adfc31c Mon Sep 17 00:00:00 2001
From: Christoph Haag <christoph.haag@collabora.com>
Date: Tue, 26 Oct 2021 23:19:39 +0200
Subject: [PATCH] ipc: Pack ipc message structs to make valgrind happy

---
 src/xrt/ipc/shared/proto.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/xrt/ipc/shared/proto.py b/src/xrt/ipc/shared/proto.py
index 019654e75..cef0ad0da 100755
--- a/src/xrt/ipc/shared/proto.py
+++ b/src/xrt/ipc/shared/proto.py
@@ -66,6 +66,8 @@ ipc_cmd_to_str(ipc_command_t id)
     f.write("\n\tdefault: return \"IPC_UNKNOWN\";")
     f.write("\n\t}\n}\n")
 
+    f.write("#pragma pack (push, 1)")
+
     for call in p.calls:
         # Should we emit a msg struct.
         if call.needs_msg_struct:
@@ -87,6 +89,8 @@ ipc_cmd_to_str(ipc_command_t id)
                 f.write("\t" + arg.get_struct_field() + ";\n")
             f.write("};\n")
 
+    f.write("#pragma pack (pop)")
+
     f.close()