in arm cancellation point asm, don't unnecessarily preserve link register
[musl] / src / stdio / freopen.c
index 6c1b575..615d4b4 100644 (file)
@@ -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);
@@ -51,4 +50,4 @@ fail:
        return NULL;
 }
 
-LFS64(freopen);
+weak_alias(freopen, freopen64);