Skip to content

Commit

Permalink
drm: Make drm.h uapi header safe for C++
Browse files Browse the repository at this point in the history
virtual is a protected keyword in C++ and can't be used at all. Ugh.

This aligns the kernel versions of the drm headers with the ones in
libdrm.

v2: Also annote with __user, as request by Emil&Ilia.

Cc: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1459350753-18320-1-git-send-email-daniel.vetter@ffwll.ch
  • Loading branch information
Daniel Vetter committed Mar 30, 2016
1 parent 44debe7 commit 4c4925f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/uapi/drm/drm.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,11 @@ struct drm_buf_pub {
*/
struct drm_buf_map {
int count; /**< Length of the buffer list */
#ifdef __cplusplus
void __user *virt;
#else
void __user *virtual; /**< Mmap'd area in user-virtual */
#endif
struct drm_buf_pub __user *list; /**< Buffer information */
};

Expand Down

0 comments on commit 4c4925f

Please sign in to comment.