@@ -266,7 +266,12 @@ typedef struct _drm_i810_copy_t {
#define PR_MASK (0x7<<18)
typedef struct drm_i810_dma {
- void *virtual;
+ union {
+#ifndef __cplusplus
+ void *virtual;
+#endif
+ void *_virtual;
+ };
int request_idx;
int request_size;
int granted;
@@ -148,7 +148,12 @@ struct drm_msm_gem_cpu_fini {
*/
struct drm_msm_gem_submit_reloc {
__u32 submit_offset; /* in, offset from submit_bo */
- __u32 or; /* in, value OR'd with result */
+ union {
+#ifndef __cplusplus
+ __u32 or; /* in, value OR'd with result */
+#endif
+ __u32 _or; /* in, value OR'd with result */
+ };
__s32 shift; /* in, amount of left shift (can be negative) */
__u32 reloc_idx; /* in, index of reloc_bo buffer */
__u64 reloc_offset; /* in, offset from start of reloc_bo */
The i810 and msm drm drivers use C++ keywords as structural members. Fix this by inserting an anonymous union that provides an alternative name and then hide the reserved name in C++. Signed-off-by: David Howells <dhowells@redhat.com> cc: Rob Clark <robdclark@gmail.com> cc: David Airlie <airlied@linux.ie> cc: linux-arm-msm@vger.kernel.org cc: dri-devel@lists.freedesktop.org cc: freedreno@lists.freedesktop.org --- include/uapi/drm/i810_drm.h | 7 ++++++- include/uapi/drm/msm_drm.h | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-)