summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/freopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/freopen.c')
-rw-r--r--lib/libc/stdio/freopen.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libc/stdio/freopen.c b/lib/libc/stdio/freopen.c
index f6fa754..fd8612c 100644
--- a/lib/libc/stdio/freopen.c
+++ b/lib/libc/stdio/freopen.c
@@ -42,6 +42,7 @@ static const char rcsid[] =
"$FreeBSD$";
#endif /* LIBC_SCCS and not lint */
+#include "namespace.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
@@ -49,7 +50,8 @@ static const char rcsid[] =
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
-#include <libc_private.h>
+#include "un-namespace.h"
+#include "libc_private.h"
#include "local.h"
/*
@@ -146,7 +148,7 @@ freopen(file, mode, fp)
* assume stderr is always fd STDERR_FILENO, even if being freopen'd.
*/
if (wantfd >= 0 && f != wantfd) {
- if (dup2(f, wantfd) >= 0) {
+ if (_dup2(f, wantfd) >= 0) {
(void)_close(f);
f = wantfd;
}
OpenPOWER on IntegriCloud