summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Elliott Hughes <enh@google.com> 2013-11-12 13:16:37 -0800
committer Elliott Hughes <enh@google.com> 2013-11-12 13:16:37 -0800
commit6a2e9bccefe4de367125d8c04c3c9a7a3bebef10 (patch)
tree645121296e1753f707610ce7b5e6ea68cf63d534
parent9e71310d15d9dfcbf5e1c94948e0260f3dc3e678 (diff)
Fix libinput to build with uapi headers.
Bug: 11559337 Change-Id: I00ca91162de7cd42e03df23bbe4208e169b2ebfe
-rw-r--r--services/input/EventHub.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/services/input/EventHub.cpp b/services/input/EventHub.cpp
index f4e1cec49e04..29e4eed82729 100644
--- a/services/input/EventHub.cpp
+++ b/services/input/EventHub.cpp
@@ -1243,6 +1243,12 @@ status_t EventHub::openDeviceLocked(const char *devicePath) {
// Enable wake-lock behavior on kernels that support it.
// TODO: Only need this for devices that can really wake the system.
+#ifndef EVIOCSSUSPENDBLOCK
+ // uapi headers don't include EVIOCSSUSPENDBLOCK, and future kernels
+ // will use an epoll flag instead, so as long as we want to support
+ // this feature, we need to be prepared to define the ioctl ourselves.
+#define EVIOCSSUSPENDBLOCK _IOW('E', 0x91, int)
+#endif
bool usingSuspendBlockIoctl = !ioctl(fd, EVIOCSSUSPENDBLOCK, 1);
// Tell the kernel that we want to use the monotonic clock for reporting timestamps