diff options
Diffstat (limited to 'newlib/libc/sys/sysvi386/dup2.c')
-rw-r--r-- | newlib/libc/sys/sysvi386/dup2.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/newlib/libc/sys/sysvi386/dup2.c b/newlib/libc/sys/sysvi386/dup2.c new file mode 100644 index 0000000..6b72599 --- /dev/null +++ b/newlib/libc/sys/sysvi386/dup2.c @@ -0,0 +1,7 @@ +#include <fcntl.h> + +int +dup2 (int fd1, int fd2) { + close (fd2); /* ignore errors, if any */ + return (fcntl (fd1, F_DUPFD, fd2)); +} |