about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlexander Barton <alex@barton.de>2010-10-19 22:17:12 +0200
committerAlexander Barton <alex@barton.de>2010-10-19 22:17:12 +0200
commit99e08eaced30fc80c91be9fdb8635409a4b93500 (patch)
tree2c06c54530febb97c9fbb9d4197afee5b212bdaf /src
parent5f2bc55d36810499a4533589acb45839f4721c84 (diff)
downloadngircd-99e08eaced30fc80c91be9fdb8635409a4b93500.tar.gz
ngircd-99e08eaced30fc80c91be9fdb8635409a4b93500.zip
Only try to set FD_CLOEXEC if this flag is defined
A/UX 3.x doesn't implement this constant, for example.
Diffstat (limited to 'src')
-rw-r--r--src/ngircd/io.c2
1 files changed, 2 insertions, 0 deletions
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;
 }