[PATCH 3/3] include/c: Define F_DUPFD_CLOEXEC on kFreeBSD systems if missing

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

 



The kernel of FreeBSD version 10 and higher supports this fcntl command,
but the system libc, in this case glibc, might not yet know about it.

Signed-off-by: Guillem Jover <guillem@xxxxxxxxxxx>
---
 include/c.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/c.h b/include/c.h
index a72e264..1eda75f 100644
--- a/include/c.h
+++ b/include/c.h
@@ -231,6 +231,12 @@ static inline int dirfd(DIR *d)
 #define O_CLOEXEC 0
 #endif
 
+#ifdef __FreeBSD_kernel__
+#ifndef F_DUPFD_CLOEXEC
+#define F_DUPFD_CLOEXEC	17	/* Like F_DUPFD, but FD_CLOEXEC is set */
+#endif
+#endif
+
 
 #ifndef AI_ADDRCONFIG
 #define AI_ADDRCONFIG 0x0020
-- 
2.2.1.209.g41e5f3a

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux