From ae2cc693f8dbe58b6c6e1f3d56d2c7ccb1831af3 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Thu, 28 May 2026 14:25:10 -0700 Subject: [PATCH] util/drirc_gen: Make the header usable from C++. Part-of: --- src/util/drirc_gen.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/util/drirc_gen.py b/src/util/drirc_gen.py index bbd74ec34f8..88f781862a9 100644 --- a/src/util/drirc_gen.py +++ b/src/util/drirc_gen.py @@ -146,6 +146,10 @@ TEMPLATE_H = """\ #ifndef ${driver_prefix.upper()}_DRIRC_H #define ${driver_prefix.upper()}_DRIRC_H +#ifdef __cplusplus +extern "C" { +#endif + #include "util/driconf.h" struct ${driver_prefix}_drirc { @@ -166,6 +170,10 @@ struct ${driver_prefix}_drirc { void ${driver_prefix}_parse_dri_options(struct ${driver_prefix}_drirc *drirc, const driConfigFileParseParams *params); +#ifdef __cplusplus +} +#endif + #endif /* ${driver_prefix.upper()}_DRIRC_H */ """