Make inputflinger_tests compile for musl

inputflinger_tests compile for the host now, so they need to be
compatible with musl libc.

Use LLONG_MIN and LLONG_MAX instead of the nonstandard LONG_LONG_MIN
and LONG_LONG_MAX.

Use input_event_sec and input_event_usec to intialize time fields in
struct input_event, they are not always stored in a struct timespec.

Include linux/ioctl.h to define _IOC_SIZE.

Cast tv_sec and tv_usec to long long, as the type can be any integer
type.

Cast EPOLLIN to compare with epoll_event.events, it is not unsigned
in musl.

Include transitive dependencies of static libraries that are not
needed by the linker when CFI is enabled, but are detected as
errors when CFI is not enabled.

Bug: 190084016
Test: m USE_HOST_MUSL=true inputflinger_tests
Change-Id: I625bb612d5a8816ec5d1ade6d3a887981a549569
diff --git a/services/inputflinger/reader/TouchVideoDevice.cpp b/services/inputflinger/reader/TouchVideoDevice.cpp
index 2f8138b..627dcba 100644
--- a/services/inputflinger/reader/TouchVideoDevice.cpp
+++ b/services/inputflinger/reader/TouchVideoDevice.cpp
@@ -198,8 +198,9 @@
     if ((buf.flags & V4L2_BUF_FLAG_TIMESTAMP_MASK) != V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC) {
         // We use CLOCK_MONOTONIC for input events, so if the clocks don't match,
         // we can't compare timestamps. Just log a warning, since this is a driver issue
-        ALOGW("The timestamp %ld.%ld was not acquired using CLOCK_MONOTONIC", buf.timestamp.tv_sec,
-              buf.timestamp.tv_usec);
+        ALOGW("The timestamp %lld.%lld was not acquired using CLOCK_MONOTONIC",
+              static_cast<long long>(buf.timestamp.tv_sec),
+              static_cast<long long>(buf.timestamp.tv_usec));
     }
     std::vector<int16_t> data(mHeight * mWidth);
     const int16_t* readFrom = mReadLocations[buf.index];