Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Oct 2014 06:21:11 +0000 (UTC)
From:      Garrett Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r273521 - head/contrib/netbsd-tests/lib/libc/sys
Message-ID:  <201410230621.s9N6LBcn038913@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Thu Oct 23 06:21:10 2014
New Revision: 273521
URL: https://svnweb.freebsd.org/changeset/base/273521

Log:
  Convert "fcntl(n, F_CLOSEM)" to "closefrom(n)"
  
  Submitted by: pho
  Sponsored by: EMC / Isilon Storage Division

Modified:
  head/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c

Modified: head/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c	Thu Oct 23 06:18:28 2014	(r273520)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_socketpair.c	Thu Oct 23 06:21:10 2014	(r273521)
@@ -63,7 +63,11 @@ run(int flags)
 	while ((i = open("/", O_RDONLY)) < 3)
 		ATF_REQUIRE(i != -1);
 
+#ifdef __FreeBSD__
+	closefrom(3);
+#else
 	ATF_REQUIRE(fcntl(3, F_CLOSEM) != -1);
+#endif
 
 	ATF_REQUIRE(socketpair(AF_UNIX, SOCK_DGRAM | flags, 0, fd) == 0);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410230621.s9N6LBcn038913>