Index: Modules/socketmodule.c =================================================================== --- Modules/socketmodule.c (revision 80433) +++ Modules/socketmodule.c (working copy) @@ -2224,8 +2224,10 @@ if (backlog == -1 && PyErr_Occurred()) return NULL; Py_BEGIN_ALLOW_THREADS - if (backlog < 1) - backlog = 1; + /* To avoid problems on systems that don't allow a negative backlog + * (which doesn't make sense anyway) we force a minimum value of 0. */ + if (backlog < 0) + backlog = 0; res = listen(s->sock_fd, backlog); Py_END_ALLOW_THREADS if (res < 0)