svn commit: r273521 - head/contrib/netbsd-tests/lib/libc/sys

Garrett Cooper ngie at FreeBSD.org
Thu Oct 23 06:21:11 UTC 2014


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);
 


More information about the svn-src-head mailing list