Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/gen default O_CLOEXEC to 0 for systems that don't d...
details: https://anonhg.NetBSD.org/src/rev/07e6c2764f23
branches: trunk
changeset: 770419:07e6c2764f23
user: mrg <mrg%NetBSD.org@localhost>
date: Sun Oct 16 05:05:38 2011 +0000
description:
default O_CLOEXEC to 0 for systems that don't define it, like, say, netbsd-5.
diffstat:
lib/libc/gen/fts.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 396feaa0a7de -r 07e6c2764f23 lib/libc/gen/fts.c
--- a/lib/libc/gen/fts.c Sun Oct 16 03:10:17 2011 +0000
+++ b/lib/libc/gen/fts.c Sun Oct 16 05:05:38 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fts.c,v 1.41 2011/10/15 23:00:01 christos Exp $ */
+/* $NetBSD: fts.c,v 1.42 2011/10/16 05:05:38 mrg Exp $ */
/*-
* Copyright (c) 1990, 1993, 1994
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)fts.c 8.6 (Berkeley) 8/14/94";
#else
-__RCSID("$NetBSD: fts.c,v 1.41 2011/10/15 23:00:01 christos Exp $");
+__RCSID("$NetBSD: fts.c,v 1.42 2011/10/16 05:05:38 mrg Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -194,6 +194,9 @@
* and ".." are all fairly nasty problems. Note, if we can't get the
* descriptor we run anyway, just more slowly.
*/
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 0
+#endif
if (!ISSET(FTS_NOCHDIR)) {
if ((sp->fts_rfd = open(".", O_RDONLY | O_CLOEXEC, 0)) == -1)
SET(FTS_NOCHDIR);
Home |
Main Index |
Thread Index |
Old Index