summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-11-14 00:08:18 -0500
committerMike Frysinger <vapier@gentoo.org>2012-11-14 00:10:32 -0500
commitdbaa240832c159e395e8b3104ecdb551c8f96b5d (patch)
tree2f9fe386497e3bb6133a669db2bbbe9e6f34dc1c /include
parent92e25ae0cded0579b1d9ea2f41523338cf81bc18 (diff)
libc/sysdeps: add dup3 syscall wrapper
Some projects (like udev) are starting to use this. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'include')
-rw-r--r--include/unistd.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/unistd.h b/include/unistd.h
index aa8e1e651..787f9e52d 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -563,6 +563,12 @@ extern int dup (int __fd) __THROW __wur;
extern int dup2 (int __fd, int __fd2) __THROW;
libc_hidden_proto(dup2)
+#ifdef __USE_GNU
+/* Duplicate FD to FD2, closing FD2 and making it open on the same
+ file while setting flags according to FLAGS. */
+extern int dup3 (int __fd, int __fd2, int __flags) __THROW;
+#endif
+
/* NULL-terminated array of "NAME=VALUE" environment variables. */
extern char **__environ;
#ifdef __USE_GNU