diff --git a/modules/udev/monitor.scm b/modules/udev/monitor.scm index a97a7de..e3599e8 100644 --- a/modules/udev/monitor.scm +++ b/modules/udev/monitor.scm @@ -27,6 +27,7 @@ ;;; Code: (define-module (udev monitor) + #:use-module (srfi srfi-1) #:export (udev-monitor udev-monitor? %make-udev-monitor @@ -63,7 +64,9 @@ seconds and microseconds, respectively. If TIMEOUT-USEC, is used, TIMEOUT-SEC must also have a value, else it is ignored, as for the 'secs' and 'usecs' argument of Guile's 'select' procedure." (let ((monitor (%make-udev-monitor udev))) - (udev-monitor-set-timeout! monitor timeout-sec timeout-usec) + (apply udev-monitor-set-timeout! + (cons monitor + (filter-map identity (list timeout-sec timeout-usec)))) (udev-monitor-set-callback! monitor callback) (udev-monitor-set-error-callback! monitor error-callback) (when filter