diff options
Diffstat (limited to 'missing.d/dup2.c')
-rw-r--r-- | missing.d/dup2.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/missing.d/dup2.c b/missing.d/dup2.c new file mode 100644 index 00000000..01068348 --- /dev/null +++ b/missing.d/dup2.c @@ -0,0 +1,12 @@ +#ifndef F_DUPFD +#include <fcntl.h> +#endif + +int +dup2 (old, new) +int old, new; +{ + (void) close(new); + + return fcntl(old, F_DUPFD, new); +} |