mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-27 14:58:30 +00:00
Add /dev/(u)random on NT (#1163)
This commit is contained in:
parent
8f6bc9dabc
commit
b6e40a3a58
17 changed files with 97 additions and 22 deletions
|
@ -52,6 +52,11 @@ static textwindows ssize_t sys_write_nt_impl(int fd, void *data, size_t size,
|
|||
struct Fd *f = g_fds.p + fd;
|
||||
bool isconsole = f->kind == kFdConsole;
|
||||
|
||||
// not implemented, XNU returns eperm();
|
||||
if (f->kind == kFdDevRandom) {
|
||||
return eperm();
|
||||
}
|
||||
|
||||
// determine win32 handle for writing
|
||||
int64_t handle = f->handle;
|
||||
if (isconsole && _weaken(GetConsoleOutputHandle)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue