From: Emil Velikov <[email protected]>

private is a reserved keyworkd in C++. Thus to make things work, we
should use something else - wl_egl_window::driver_private.

Make sure to do so only for C++ contexts, or otherwise it will break the
API - leading to build failures when used alongside existing Mesa.

Cc: Daniel Stone <[email protected]>
Cc: Arnaud Vrac <[email protected]>
Cc: Miguel A . Vico <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
---
 egl/wayland-egl-backend.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/egl/wayland-egl-backend.h b/egl/wayland-egl-backend.h
index 3c23a56..b16ff45 100644
--- a/egl/wayland-egl-backend.h
+++ b/egl/wayland-egl-backend.h
@@ -53,7 +53,15 @@ struct wl_egl_window {
        int attached_width;
        int attached_height;
 
+       /*
+        * private is a reserved word in C++ - use driver_private instead.
+        * Don't change the name otherwise, in order to preserve the existing C 
API.
+        */
+#ifdef __cplusplus
+       void *driver_private;
+#else
        void *private;
+#endif
        void (*resize_callback)(struct wl_egl_window *, void *);
        void (*destroy_window_callback)(void *);
 
-- 
2.16.0

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to