evdev_device_create(struct libinput_seat *seat,
struct udev_device *udev_device)
{
+#define STRERR_BUFSIZE 256
struct libinput *libinput = seat->libinput;
struct evdev_device *device = NULL;
int rc;
int unhandled_device = 0;
const char *devnode = udev_device_get_devnode(udev_device);
char *sysname = str_sanitize(udev_device_get_sysname(udev_device));
+ char buf[STRERR_BUFSIZE] = {0, };
if (!devnode) {
log_info(libinput, "%s: no device node associated\n", sysname);
"%s: opening input device '%s' failed (%s).\n",
sysname,
devnode,
- strerror(-fd));
+ strerror_r(-fd, buf, STRERR_BUFSIZE));
goto err;
}