From: Gerald Pfeifer gerald@pfeifer.com
find_device_from_devnode was guarded by HAVE_SYS_INOTIFY_H, alas its use in process_monitor_event was not, so linking failed.
On the way reduce the scope of a variable (which makes sense per se and avoids introducing a compiler warning with this change). --- dlls/winebus.sys/bus_udev.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c index 71b9ef84530..dfd9c97fdc6 100644 --- a/dlls/winebus.sys/bus_udev.c +++ b/dlls/winebus.sys/bus_udev.c @@ -1714,7 +1714,6 @@ error:
static void process_monitor_event(struct udev_monitor *monitor) { - struct base_device *impl; struct udev_device *dev; const char *action;
@@ -1735,9 +1734,13 @@ static void process_monitor_event(struct udev_monitor *monitor) udev_add_device(dev, -1); else { +#ifdef HAVE_SYS_INOTIFY_H + struct base_device *impl; + impl = find_device_from_devnode(udev_device_get_devnode(dev)); if (impl) bus_event_queue_device_removed(&event_queue, &impl->unix_device); else WARN("failed to find device for udev device %p\n", dev); +#endif }
udev_device_unref(dev);