author | Rich Felker <dalias@aerifal.cx> | 2018年09月10日 23:26:40 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2018年09月12日 14:34:33 -0400 |
commit | 13d1afa46f8098df290008c681816c9eb89ffbdb (patch) | |
tree | 01ec1581298b49f20848f9c5ce61bfa9bccd7e1a /src/stdio/freopen.c | |
parent | 8c1ac426e15b27d2879afa26a500fd80010b33b9 (diff) | |
download | musl-13d1afa46f8098df290008c681816c9eb89ffbdb.tar.gz |
-rw-r--r-- | src/stdio/freopen.c | 3 |
diff --git a/src/stdio/freopen.c b/src/stdio/freopen.c index 6c1b575f..a9c83c85 100644 --- a/src/stdio/freopen.c +++ b/src/stdio/freopen.c @@ -1,5 +1,6 @@ #include "stdio_impl.h" #include <fcntl.h> +#include <unistd.h> /* The basic idea of this implementation is to open a new FILE, * hack the necessary parts of the new FILE into the old one, then @@ -9,8 +10,6 @@ * lock, via flockfile or otherwise, when freopen is called, and in that * case, freopen cannot act until the lock is released. */ -int __dup3(int, int, int); - FILE *freopen(const char *restrict filename, const char *restrict mode, FILE *restrict f) { int fl = __fmodeflags(mode); |