diff --git a/src/gallium/auxiliary/os/os_mman.h b/src/gallium/auxiliary/os/os_mman.h index 04b3e0a9f72..1d07ce654a0 100644 --- a/src/gallium/auxiliary/os/os_mman.h +++ b/src/gallium/auxiliary/os/os_mman.h @@ -45,7 +45,7 @@ # error Unsupported OS #endif -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif diff --git a/src/gallium/auxiliary/util/u_trace_gallium.c b/src/gallium/auxiliary/util/u_trace_gallium.c index 3e9a254a469..7029fabd1cf 100644 --- a/src/gallium/auxiliary/util/u_trace_gallium.c +++ b/src/gallium/auxiliary/util/u_trace_gallium.c @@ -29,7 +29,7 @@ #include "u_tracepoints.h" -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -91,6 +91,6 @@ trace_framebuffer_state(struct u_trace *ut, void *cs, const struct pipe_framebuf } } -#ifdef __cplusplus +#ifdef __cplusplus } #endif diff --git a/src/gallium/auxiliary/util/u_trace_gallium.h b/src/gallium/auxiliary/util/u_trace_gallium.h index e37e3e66361..32e4e711828 100644 --- a/src/gallium/auxiliary/util/u_trace_gallium.h +++ b/src/gallium/auxiliary/util/u_trace_gallium.h @@ -26,7 +26,7 @@ #include "util/perf/u_trace.h" -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -50,7 +50,7 @@ u_trace_pipe_context_init(struct u_trace_context *utctx, void trace_framebuffer_state(struct u_trace *ut, void *cs, const struct pipe_framebuffer_state *pfb); -#ifdef __cplusplus +#ifdef __cplusplus } #endif diff --git a/src/util/os_file.h b/src/util/os_file.h index 0c69eeaafe1..85065c2da36 100644 --- a/src/util/os_file.h +++ b/src/util/os_file.h @@ -11,7 +11,7 @@ #include #include -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif diff --git a/src/util/os_misc.h b/src/util/os_misc.h index d0c2243d1aa..f5a22ef93a7 100644 --- a/src/util/os_misc.h +++ b/src/util/os_misc.h @@ -46,7 +46,7 @@ #endif -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif diff --git a/src/util/perf/u_trace.h b/src/util/perf/u_trace.h index 8f21c4941dc..2e38f068d40 100644 --- a/src/util/perf/u_trace.h +++ b/src/util/perf/u_trace.h @@ -30,7 +30,7 @@ #include "util/u_queue.h" -#ifdef __cplusplus +#ifdef __cplusplus extern "C" { #endif @@ -294,7 +294,7 @@ u_trace_context_instrumenting(struct u_trace_context *utctx) return !!utctx->out || ut_trace_instrument || (ut_perfetto_enabled > 0); } -#ifdef __cplusplus +#ifdef __cplusplus } #endif diff --git a/src/util/perf/u_trace.py b/src/util/perf/u_trace.py index 9ecca608e20..c0ef3db9d86 100644 --- a/src/util/perf/u_trace.py +++ b/src/util/perf/u_trace.py @@ -189,7 +189,7 @@ struct trace_${trace_name} { ${arg.type} ${arg.name}; % endfor % if len(trace.args) == 0: -#ifdef __cplusplus +#ifdef __cplusplus /* avoid warnings about empty struct size mis-match in C vs C++.. * the size mis-match is harmless because (a) nothing will deref * the empty struct, and (b) the code that cares about allocating