-#ifdef SOCK_CLOEXEC
- if (socketpair(PF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0, resolv->fds) < 0 ||
- socketpair(PF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0, resolv->fds+2) < 0) {
-
- /* Try again, without SOCK_CLOEXEC */
- if (errno == EINVAL) {
-#endif
- if (socketpair(PF_UNIX, SOCK_DGRAM, 0, resolv->fds) < 0 ||
- socketpair(PF_UNIX, SOCK_DGRAM, 0, resolv->fds+2) < 0)
- goto fail;
-#ifdef SOCK_CLOEXEC
- } else
- goto fail;
- }
-#endif
+ r = socketpair(PF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0, resolv->fds);
+ if (r < 0)
+ goto fail;