summaryrefslogtreecommitdiff
path: root/src/stdio
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio')
-rw-r--r--src/stdio/freopen.c3
-rw-r--r--src/stdio/tempnam.c3
-rw-r--r--src/stdio/tmpfile.c3
-rw-r--r--src/stdio/tmpnam.c3
4 files changed, 4 insertions, 8 deletions
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);
diff --git a/src/stdio/tempnam.c b/src/stdio/tempnam.c
index 5a559752..84f91978 100644
--- a/src/stdio/tempnam.c
+++ b/src/stdio/tempnam.c
@@ -4,12 +4,11 @@
#include <sys/stat.h>
#include <limits.h>
#include <string.h>
+#include <stdlib.h>
#include "syscall.h"
#define MAXTRIES 100
-char *__randname(char *);
-
char *tempnam(const char *dir, const char *pfx)
{
char s[PATH_MAX];
diff --git a/src/stdio/tmpfile.c b/src/stdio/tmpfile.c
index 525090aa..55d742fa 100644
--- a/src/stdio/tmpfile.c
+++ b/src/stdio/tmpfile.c
@@ -1,11 +1,10 @@
#include <stdio.h>
#include <fcntl.h>
+#include <stdlib.h>
#include "stdio_impl.h"
#define MAXTRIES 100
-char *__randname(char *);
-
FILE *tmpfile(void)
{
char s[] = "/tmp/tmpfile_XXXXXX";
diff --git a/src/stdio/tmpnam.c b/src/stdio/tmpnam.c
index 449eb9b0..6c7c253a 100644
--- a/src/stdio/tmpnam.c
+++ b/src/stdio/tmpnam.c
@@ -3,12 +3,11 @@
#include <errno.h>
#include <sys/stat.h>
#include <string.h>
+#include <stdlib.h>
#include "syscall.h"
#define MAXTRIES 100
-char *__randname(char *);
-
char *tmpnam(char *buf)
{
static char internal[L_tmpnam];