blob: 7d7c3566b97df39ca65cebce38664da268c079ea (
plain) (
tree)
|
|
From 9f2b2a3a6153be7ae5cef3305161c07fa2f6f70c Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jdapena@igalia.com>
Date: Tue, 15 Sep 2020 18:58:11 +0000
Subject: [PATCH] GCC: do not use anonymous structs
Two using declarations have been added in x11.h for an
unnamed struct. This is not allowed by C++ (and GCC). An example:
using XErrorEvent = struct {
...
};
The solution is giving a name to the struct.
Bug: 819294
Change-Id: I9e77017851efe8e0a92fb37c01fdba693bb7a36d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2412450
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/master@{#807126}
---
diff --git a/ui/gfx/x/x11.h b/ui/gfx/x/x11.h
index 6b36d48..d2dab40 100644
--- a/ui/gfx/x/x11.h
+++ b/ui/gfx/x/x11.h
@@ -139,7 +139,7 @@
enum XEventQueueOwner { XlibOwnsEventQueue = 0, XCBOwnsEventQueue };
-using XErrorEvent = struct {
+using XErrorEvent = struct _XErrorEvent {
int type;
Display* display;
XID resourceid;
@@ -149,7 +149,7 @@
unsigned char minor_code;
};
-using XRectangle = struct {
+using XRectangle = struct _XRectangle {
short x, y;
unsigned short width, height;
};
@@ -161,7 +161,7 @@
XPointer private_data;
};
-using Visual = struct {
+using Visual = struct _Visual {
XExtData* ext_data;
VisualID visualid;
int c_class;
@@ -170,7 +170,7 @@
int map_entries;
};
-using XVisualInfo = struct {
+using XVisualInfo = struct _XVisualInfo {
Visual* visual;
VisualID visualid;
int screen;
|