From ff667282126373dd4753a86aa0def0a02ef86e61 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Wed, 4 Apr 2018 19:11:03 -0700 Subject: [PATCH] LinuxInputDeviceManager: Fix fcntl() call --- panda/src/device/linuxInputDeviceManager.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/panda/src/device/linuxInputDeviceManager.cxx b/panda/src/device/linuxInputDeviceManager.cxx index 114ac144e3..2b19502592 100644 --- a/panda/src/device/linuxInputDeviceManager.cxx +++ b/panda/src/device/linuxInputDeviceManager.cxx @@ -33,7 +33,8 @@ LinuxInputDeviceManager:: LinuxInputDeviceManager() { // Use inotify to watch /dev/input for hotplugging of devices. _inotify_fd = inotify_init(); - fcntl(_inotify_fd, O_NONBLOCK | O_CLOEXEC); + fcntl(_inotify_fd, F_SETFL, O_NONBLOCK); + fcntl(_inotify_fd, F_SETFD, FD_CLOEXEC); if (_inotify_fd < 0) { device_cat.error()