From 99e08eaced30fc80c91be9fdb8635409a4b93500 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 19 Oct 2010 22:17:12 +0200 Subject: [PATCH] Only try to set FD_CLOEXEC if this flag is defined A/UX 3.x doesn't implement this constant, for example. --- src/ngircd/io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ngircd/io.c b/src/ngircd/io.c index 6843899d..411b383e 100644 --- a/src/ngircd/io.c +++ b/src/ngircd/io.c @@ -791,7 +791,9 @@ io_setcloexec(int fd) int flags = fcntl(fd, F_GETFD); if (flags == -1) return false; +#ifdef FD_CLOEXEC flags |= FD_CLOEXEC; +#endif return fcntl(fd, F_SETFD, flags) == 0; } -- 2.39.2