ipc: Protect ipc_generated_protocol.h with cpp header guard

This commit is contained in:
Jakob Bornecrantz 2023-11-14 19:24:13 +00:00
parent 5ee268458f
commit 195d45d960

View file

@ -141,7 +141,12 @@ def generate_h(file, p):
f.write('''
#pragma once
#include "xrt/xrt_compiler.h"
''')
write_cpp_header_guard_start(f)
f.write('''
struct ipc_connection;
''')
@ -203,6 +208,7 @@ ipc_cmd_to_str(ipc_command_t id)
f.write("#pragma pack (pop)\n")
write_cpp_header_guard_end(f)
f.close()
@ -256,7 +262,6 @@ def generate_client_h(file, p):
f.write(";\n")
write_cpp_header_guard_end(f)
f.close()