diff options
author | Mikko Rapeli <mikko.rapeli@iki.fi> | 2014-08-31 12:58:46 +0200 |
---|---|---|
committer | Gabriel Laskar <gabriel@lse.epita.fr> | 2015-12-10 12:33:23 +0100 |
commit | 1a2a42c8bfa25ef0f7e14c5973c6a0bebe625a96 (patch) | |
tree | 9662dbf8655f2fbc8243f6d7ccf8f422e905ea3e /include/uapi | |
parent | 527e9316f8ec44bd53d90fb9f611fa7ffff52bb9 (diff) |
drm.h: use __kernel_size_t instead of size_t
Fall back to size_t for non Linux platforms.
Fixes userspace compilation error:
drm/drm.h:132:2: error: unknown type name ‘size_t’
Signed-off-by: Mikko Rapeli <mikko.rapeli@iki.fi>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/drm/drm.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 3801584a0c53..b4e92eb12044 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -54,6 +54,7 @@ typedef int32_t __s32; typedef uint32_t __u32; typedef int64_t __s64; typedef uint64_t __u64; +typedef size_t __kernel_size_t; typedef unsigned long drm_handle_t; #endif @@ -129,11 +130,11 @@ struct drm_version { int version_major; /**< Major version */ int version_minor; /**< Minor version */ int version_patchlevel; /**< Patch level */ - size_t name_len; /**< Length of name buffer */ + __kernel_size_t name_len; /**< Length of name buffer */ char __user *name; /**< Name of driver */ - size_t date_len; /**< Length of date buffer */ + __kernel_size_t date_len; /**< Length of date buffer */ char __user *date; /**< User-space buffer to hold date */ - size_t desc_len; /**< Length of desc buffer */ + __kernel_size_t desc_len; /**< Length of desc buffer */ char __user *desc; /**< User-space buffer to hold desc */ }; @@ -143,7 +144,7 @@ struct drm_version { * \sa drmGetBusid() and drmSetBusId(). */ struct drm_unique { - size_t unique_len; /**< Length of unique */ + __kernel_size_t unique_len; /**< Length of unique */ char __user *unique; /**< Unique name for driver instantiation */ }; |