--- /dev/null
+ o Minor bugfixes:
+ - Work correctly on Linux systems with accept4 support advertised in
+ their headers, but without accept4 support in the kernel. Fix
+ by murb. Fixes bug 5762; bugfix on 0.2.3.1-alpha.
s = accept4(sockfd, addr, len, SOCK_CLOEXEC);
if (SOCKET_OK(s))
goto socket_ok;
- /* If we got an error, see if it is EINVAL. EINVAL might indicate that,
+ /* If we got an error, see if it is ENOSYS. ENOSYS indicates that,
* event though we were built on a system with accept4 support, we
- * are running on one without. */
- if (errno != EINVAL)
+ * are running on one without. Also, check for EINVAL, which indicates that
+ * we are missing SOCK_CLOEXEC support. */
+ if (errno != EINVAL && errno != ENOSYS)
return s;
#endif