diff options
Diffstat (limited to 'winsup/cygwin/mktemp.cc')
-rw-r--r-- | winsup/cygwin/mktemp.cc | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/winsup/cygwin/mktemp.cc b/winsup/cygwin/mktemp.cc index 7770c3bff..4dc157da4 100644 --- a/winsup/cygwin/mktemp.cc +++ b/winsup/cygwin/mktemp.cc @@ -11,7 +11,6 @@ See the copyright at the bottom of this file. */ #include <unistd.h> static int _gettemp(char *, int *, int, size_t, int); -static uint32_t arc4random (); static const char padchar[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; @@ -93,7 +92,7 @@ _gettemp(char *path, int *doopen, int domkdir, size_t suffixlen, int flags) /* * check the target directory. */ - struct __stat64 sbuf; + struct stat sbuf; if (doopen != NULL || domkdir) { for (; trv > path; trv--) @@ -153,20 +152,6 @@ _gettemp(char *path, int *doopen, int domkdir, size_t suffixlen, int flags) /*NOTREACHED*/ } -static uint32_t -arc4random () -{ - union - { - uint32_t rand; - char buf[sizeof (int) / 8]; - } r; - int fd = open ("/dev/urandom", O_RDONLY); - read (fd, r.buf, 4); - close (fd); - return r.rand; -} - /* * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. |