O_CLOEXEC should be FD_CLOEXEC
@@ -673,7 +673,7 @@ set_cloexec(struct nsd_socket *sock)
{
assert(sock != NULL);
- if(fcntl(sock->s, F_SETFD, O_CLOEXEC) == -1) {
+ if(fcntl(sock->s, F_SETFD, FD_CLOEXEC) == -1) {
const char *socktype =
sock->addr.ai_family == SOCK_DGRAM ? "udp" : "tcp";
log_msg(LOG_ERR, "fcntl(..., O_CLOEXEC) failed for %s: %s",
