headers/bsd: Add sys/queue.h.
[haiku.git] / src / system / libroot / posix / unistd / dup.c
blobd5ee4afdb3676cae861003cef46e3e1095a2fc1f
1 /*
2 * Copyright 2004-2009, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
4 */
7 #include <errno.h>
8 #include <unistd.h>
10 #include <errno_private.h>
11 #include <syscalls.h>
12 #include <syscall_utils.h>
15 int
16 dup(int fd)
18 RETURN_AND_SET_ERRNO(_kern_dup(fd));
22 int
23 dup2(int oldFD, int newFD)
25 RETURN_AND_SET_ERRNO(_kern_dup2(oldFD, newFD));