From a57ba6c3bed5f648de9bf589c886cb7e7f1c7e67 Mon Sep 17 00:00:00 2001 From: Konsta Date: Sat, 8 Feb 2020 18:55:42 +0200 Subject: [PATCH 1/3] fix build on Android Pie * TODO: update ir-keytable to newer version * This was originally lifted from v4l-utils around commit c9c77f2ffd375266b1d44bb551a90dcd77ea51f3 --- keytable.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/keytable.c b/keytable.c index 8595f5f..939d5af 100644 --- a/keytable.c +++ b/keytable.c @@ -83,11 +83,6 @@ static const char doc[] = { }; -static const char args_doc[] = { - "--device [/dev/input/event* device]\n" - "--sysdev [ir class (f. ex. rc0)]\n" - "[for using the rc0 sysdev]"}; - struct input_keymap_entry_v2 { #define KEYMAP_BY_INDEX (1 << 0) u_int8_t flags; @@ -236,7 +231,6 @@ static int parse_code(char *string) const char *argp_program_version = "IR keytable control version " V4L_UTILS_VERSION; const char *argp_program_bug_address = "Mauro Carvalho Chehab "; -static int print_version = 0; static const struct option long_options[] = { {"verbose", no_argument, 0, 'v'}, {"clear", no_argument, 0, 'c'}, @@ -480,10 +474,8 @@ static int parse_opt(int argc, char* argv[]) long key; int rc; int c; - int digit_optind = 0; while (1) { - int this_option_optind = optind ? optind : 1; int option_index = 0; c = getopt_long(argc, argv, "vtcD:P:Ad:s:rw:a:k:p:d:f:V",long_options, &option_index); if (c == -1) @@ -1294,7 +1286,7 @@ static void test_event(int fd) return; } - for (i = 0; i < rd / sizeof(struct input_event); i++) { + for (i = 0; i < rd / (int) sizeof(struct input_event); i++) { printf(_("%ld.%06ld: event type %s(0x%02x)"), ev[i].time.tv_sec, ev[i].time.tv_usec, get_event_name(events_type, ev[i].type), ev[i].type); From 97737cdee81af160f03d19f1dcfbd7411b2a5f25 Mon Sep 17 00:00:00 2001 From: Konsta Date: Sat, 8 Feb 2020 19:00:13 +0200 Subject: [PATCH 2/3] convert Android.mk to Android.bp --- Android.bp | 4 ++++ Android.mk | 8 -------- 2 files changed, 4 insertions(+), 8 deletions(-) create mode 100644 Android.bp delete mode 100644 Android.mk diff --git a/Android.bp b/Android.bp new file mode 100644 index 0000000..868c5cd --- /dev/null +++ b/Android.bp @@ -0,0 +1,4 @@ +cc_binary { + name: "ir-keytable", + srcs: ["keytable.c"], +} diff --git a/Android.mk b/Android.mk deleted file mode 100644 index 1a2d445..0000000 --- a/Android.mk +++ /dev/null @@ -1,8 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := keytable.c -LOCAL_MODULE := ir-keytable -LOCAL_C_INCLUDES := external/v4l-utils -include $(BUILD_EXECUTABLE) From 04dd6d0954cc7077615403ae8bd72b2abd5fc929 Mon Sep 17 00:00:00 2001 From: Konsta Date: Fri, 24 Jul 2020 12:44:34 +0300 Subject: [PATCH 3/3] move to vendor Change-Id: Ia46582a0a5120308b6f745a588819684a1d651bc --- Android.bp | 1 + 1 file changed, 1 insertion(+) diff --git a/Android.bp b/Android.bp index 868c5cd..46dd91c 100644 --- a/Android.bp +++ b/Android.bp @@ -1,4 +1,5 @@ cc_binary { name: "ir-keytable", + proprietary: true, srcs: ["keytable.c"], }