diff options
Diffstat (limited to 'mdk-stage1/dietlibc/libpthread/pthread_fdglue2.c')
-rw-r--r-- | mdk-stage1/dietlibc/libpthread/pthread_fdglue2.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mdk-stage1/dietlibc/libpthread/pthread_fdglue2.c b/mdk-stage1/dietlibc/libpthread/pthread_fdglue2.c new file mode 100644 index 000000000..d73c84220 --- /dev/null +++ b/mdk-stage1/dietlibc/libpthread/pthread_fdglue2.c @@ -0,0 +1,16 @@ +#include "dietstdio.h" +#include <unistd.h> +#include <fcntl.h> +#include <errno.h> +#include <stdlib.h> +#include <pthread.h> +#include <errno.h> + +extern int __stdio_atexit; +extern FILE* __stdio_init_file_nothreads(int fd,int closeonerror); + +FILE* __stdio_init_file(int fd,int closeonerror) { + FILE *tmp=__stdio_init_file_nothreads(fd,closeonerror); + if (tmp) pthread_mutex_init(&tmp->m,0); + return tmp; +} |