Index: ui/ozone/platform/drm/gpu/drm_device.cc |
diff --git a/ui/ozone/platform/drm/gpu/drm_device.cc b/ui/ozone/platform/drm/gpu/drm_device.cc |
index 462ec641a43a63eb596a8a0c1d0689b216eec02c..03ac08417b654c485fa12c3dcd8168074ce09862 100644 |
--- a/ui/ozone/platform/drm/gpu/drm_device.cc |
+++ b/ui/ozone/platform/drm/gpu/drm_device.cc |
@@ -670,7 +670,21 @@ bool DrmDevice::CommitProperties(drmModeAtomicReq* properties, |
bool DrmDevice::SetCapability(uint64_t capability, uint64_t value) { |
DCHECK(file_.IsValid()); |
- return !drmSetClientCap(file_.GetPlatformFile(), capability, value); |
+ |
+#ifndef DRM_IOCTL_SET_CLIENT_CAP |
+// drmSetClientCap was introduced in a later version of libdrm than the wheezy |
+// sysroot supplies. |
+// TODO(thomasanderson): Remove this when support for the wheezy sysroot is |
+// dropped in favor of jessie. |
+#define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW(0x0d, struct drm_set_client_cap) |
+ struct drm_set_client_cap { |
+ __u64 capability; |
+ __u64 value; |
+ }; |
+#endif |
+ |
+ struct drm_set_client_cap cap = {capability, value}; |
+ return !drmIoctl(file_.GetPlatformFile(), DRM_IOCTL_SET_CLIENT_CAP, &cap); |
} |
bool DrmDevice::SetMaster() { |