[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#785796: glibc: kfreebsd should define F_DUPFD_CLOEXEC



retitle 785796 glibc: kfreebsd should define F_DUPFD_CLOEXEC
reassign 785796 src:glibc
found 785796 glibc/2.19-18
affects 785796 src:util-linux
tags 785796 + patch
thanks

Hi,

util-linux FTBFS on kfreebsd as it assumes fcntl supports
F_DUPFD_CLOEXEC (of POSIX.1-2008):

Andreas Henriksson wrote:
> 11:02 < ah> kzak: fwiw, commit d1f9c0969e apparently broke kfreebsd where 
>             F_DUPFD_CLOEXEC is not defined.... 
> [...]

This has only been implemented since kfreebsd-10 so we didn't define
it yet in bits/fcntl.h, but we should add this now.  I've committed
this to glibc-ports:

--- kfreebsd/bits/fcntl.h	(revision 5713)
+++ kfreebsd/bits/fcntl.h	(working copy)
@@ -148,6 +148,10 @@
 #define F_SETLK64	12	/* Set record locking info (non-blocking).  */
 #define F_SETLKW64	13	/* Set record locking info (blocking).	*/
 
+#if __USE_BSD || __POSIX_VISIBLE >= 200809
+#define	F_DUPFD_CLOEXEC	17	/* Like F_DUPFD, but FD_CLOEXEC is set */
+#endif
+
 #if defined __USE_BSD || defined __USE_UNIX98
 # define F_GETOWN	5	/* Get owner of socket (receiver of SIGIO).  */
 # define F_SETOWN	6	/* Set owner of socket (receiver of SIGIO).  */

Thanks,
Regards,
-- 
Steven Chamberlain
steven@pyro.eu.org


Reply to: