From: Chih-Wei Huang Date: Thu, 15 Oct 2015 16:49:55 +0000 (+0800) Subject: powerbtnd: include the header for string functions prototypes X-Git-Tag: android-x86-7.1-r1 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=refs%2Ftags%2Fandroid-x86-7.1-r4;p=android-x86%2Fhardware-libhardware_legacy.git powerbtnd: include the header for string functions prototypes Also fixes a warning of mismatching argument. --- diff --git a/power/powerbtnd.c b/power/powerbtnd.c index f8fd656..855bdc8 100644 --- a/power/powerbtnd.c +++ b/power/powerbtnd.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -130,7 +131,7 @@ int main() struct input_event iev; size_t res = read(pfds[i].fd, &iev, sizeof(iev)); if (res < sizeof(iev)) { - ALOGW("insufficient input data(%d)? fd=%d", res, pfds[i].fd); + ALOGW("insufficient input data(%zd)? fd=%d", res, pfds[i].fd); continue; } ALOGD("type=%d scancode=%d value=%d from fd=%d", iev.type, iev.code, iev.value, pfds[i].fd);