aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.linaro1
-rw-r--r--aibd.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/README.linaro b/README.linaro
index 373c041..89ed986 100644
--- a/README.linaro
+++ b/README.linaro
@@ -2,3 +2,4 @@ This is a clone of
git://github.com/rperier/android_input_bridge
Local modifications:
+- Make it compile on 4.2+ (patch submitted upstream 2012/11/19)
diff --git a/aibd.c b/aibd.c
index 2cf04ac..03c4b3b 100644
--- a/aibd.c
+++ b/aibd.c
@@ -37,7 +37,7 @@
static int remote_socks[LISTENING_QUEUE_SIZE];
static struct input_event events[EVENTS_QUEUE_SIZE];
-static uint32_t buffer[EVENTS_QUEUE_SIZE * 2];
+static uint32_t buffer[EVENTS_QUEUE_SIZE * 2 + 1];
static void usage(char *progname)
{
@@ -143,7 +143,7 @@ static int input_subsystem_init(void)
for(i = 1; i <= 248; i++)
ioctlx(uinput_fd, UI_SET_KEYBIT, i);
- memcpy(uidev.name, "aibd-device", UINPUT_MAX_NAME_SIZE);
+ memcpy(uidev.name, "aibd-device\0", UINPUT_MAX_NAME_SIZE < 12 ? UINPUT_MAX_NAME_SIZE : 12);
uidev.id.bustype = BUS_USB;
uidev.id.version = 1;