diff usr/src/uts/common/sys/socket.h @ 14022:19e11862653b

3713 Implement accept4() 3714 Implement pipe2() 3715 Implement dup3() 3716 Implement mkostemp() and mkostemps() 3719 so_socketpair syscall should preserve FD_CLOEXEC flag Reviewed by: Dan McDonald <danmcd@nexenta.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Garrett D'Amore <garrett@damore.org>
author Theo Schlossnagle <jesus@omniti.com>
date Thu, 11 Apr 2013 04:50:36 +0000
parents 1a1202688ff3
children
line wrap: on
line diff
--- a/usr/src/uts/common/sys/socket.h	Thu Apr 18 21:49:49 2013 -0400
+++ b/usr/src/uts/common/sys/socket.h	Thu Apr 11 04:50:36 2013 +0000
@@ -106,9 +106,11 @@
 #define	SOCK_TYPE_MASK	0xffff		/* type reside in these bits only */
 
 /*
- * Flags for socket()
+ * Flags for socket() and accept4()
  */
-#define	SOCK_CLOEXEC	0x80000		/* like open(2) O_CLOEXEC for socket */
+#define	SOCK_CLOEXEC	0x080000	/* like open(2) O_CLOEXEC for socket */
+#define	SOCK_NONBLOCK	0x100000	/* like O_NONBLOCK */
+#define	SOCK_NDELAY	0x200000	/* like O_NDELAY */
 
 /*
  * Option flags per-socket.
@@ -522,6 +524,7 @@
 #if !defined(_KERNEL) || defined(_BOOT)
 #ifdef	__STDC__
 extern int accept(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t);
+extern int accept4(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t, int);
 extern int bind(int, const struct sockaddr *, socklen_t);
 extern int connect(int, const struct sockaddr *, socklen_t);
 extern int getpeername(int, struct sockaddr *_RESTRICT_KYWD, Psocklen_t);
@@ -546,6 +549,7 @@
 #endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */
 #else	/* __STDC__ */
 extern int accept();
+extern int accept4();
 extern int bind();
 extern int connect();
 extern int getpeername();