diff options
Diffstat (limited to 'src/udev/udev-ctrl.c')
-rw-r--r-- | src/udev/udev-ctrl.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/udev/udev-ctrl.c b/src/udev/udev-ctrl.c index c0c3fe5ae7..4586b014e7 100644 --- a/src/udev/udev-ctrl.c +++ b/src/udev/udev-ctrl.c @@ -10,7 +10,6 @@ */ #include <errno.h> -#include <fcntl.h> #include <stdio.h> #include <stdlib.h> #include <stddef.h> @@ -191,24 +190,8 @@ struct udev_ctrl_connection *udev_ctrl_get_connection(struct udev_ctrl *uctrl) #if HAVE_DECL_ACCEPT4 conn->sock = accept4(uctrl->sock, NULL, NULL, SOCK_CLOEXEC|SOCK_NONBLOCK); - - /* Fallback path when accept4() is unavailable */ - if ( conn->sock < 0 && (errno == ENOSYS || errno == ENOTSUP) ) - { - conn->sock = accept(uctrl->sock, NULL, NULL); - - if (conn->sock >= 0) { - fcntl(conn->sock, F_SETFL, O_NONBLOCK); - fcntl(conn->sock, F_SETFD, FD_CLOEXEC); - } - } #else conn->sock = accept(uctrl->sock, NULL, NULL); - - if (conn->sock >= 0) { - fcntl(conn->sock, F_SETFL, O_NONBLOCK); - fcntl(conn->sock, F_SETFD, FD_CLOEXEC); - } #endif if (conn->sock < 0) { |