diff options
author | Victor Stinner <vstinner@wyplay.com> | 2012-03-13 14:29:08 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@wyplay.com> | 2012-03-13 14:29:08 (GMT) |
commit | d327f9de1f9affd2ce7296c5cdc3984ded1ee747 (patch) | |
tree | 178193f11f110124c90fce28663f6d6de3e2dd31 /Modules/selectmodule.c | |
parent | 3a31dd407a966ff5265cab0f52b3bc9fa044f1aa (diff) | |
download | cpython-d327f9de1f9affd2ce7296c5cdc3984ded1ee747.zip cpython-d327f9de1f9affd2ce7296c5cdc3984ded1ee747.tar.gz cpython-d327f9de1f9affd2ce7296c5cdc3984ded1ee747.tar.bz2 |
Issue #14180: Fix select.select() compilation on BSD and a typo in kqueue_queue_control()
Diffstat (limited to 'Modules/selectmodule.c')
-rw-r--r-- | Modules/selectmodule.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index 4d99250..179dd61 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -223,8 +223,10 @@ select_select(PyObject *self, PyObject *args) return NULL; } else { - if (_PyTime_ObjectToTimeval(tout, &tv.tv_sec, &tv.tv_usec) == -1) + long usec; + if (_PyTime_ObjectToTimeval(tout, &tv.tv_sec, &usec) == -1) return NULL; + tv.tv_usec = usec; if (tv.tv_sec < 0) { PyErr_SetString(PyExc_ValueError, "timeout must be non-negative"); return NULL; @@ -1837,7 +1839,7 @@ kqueue_queue_control(kqueue_queue_Object *self, PyObject *args) PyObject *result = NULL; struct kevent *evl = NULL; struct kevent *chl = NULL; - struct timespec timeoutspec; + struct timespec timeout; struct timespec *ptimeoutspec; if (self->kqfd < 0) |