From: Sung-Jin Park Date: Mon, 3 Apr 2017 06:29:20 +0000 (+0900) Subject: evdev: use strerror_r() instead of strerror() to guarantee of thread safety X-Git-Tag: accepted/tizen/common/20170404.143004^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_tv;p=platform%2Fcore%2Fuifw%2Fpepper.git evdev: use strerror_r() instead of strerror() to guarantee of thread safety Change-Id: Idb356a17bce3d1d36ede1d5ef8c27bf3cce5b318 Signed-off-by: Sung-Jin Park --- diff --git a/src/lib/evdev/evdev.c b/src/lib/evdev/evdev.c index 473b123..9804bed 100644 --- a/src/lib/evdev/evdev.c +++ b/src/lib/evdev/evdev.c @@ -110,6 +110,7 @@ _evdev_keyboard_event_fd_read(int fd, uint32_t mask, void *data) { uint32_t i; int nread; + char buf[128]; struct input_event ev[EVENT_MAX]; evdev_device_info_t *device_info = (evdev_device_info_t *)data; @@ -123,7 +124,7 @@ _evdev_keyboard_event_fd_read(int fd, uint32_t mask, void *data) nread = read(fd, &ev, sizeof(ev)); PEPPER_CHECK(nread>=0, return 0, "[%s] Failed on reading given fd. (error : %s, fd:%d)\n", - __FUNCTION__, strerror(errno), fd); + __FUNCTION__, strerror_r(errno, buf, 128), fd); for (i = 0 ; i < (nread / sizeof(ev[0])); i++) {