]> git.pond.sub.org Git - empserver/commit
chance: Avoid abuse of O_NONBLOCK for Windows
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 27 Jan 2021 07:36:34 +0000 (08:36 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sat, 13 Feb 2021 18:25:18 +0000 (19:25 +0100)
commitb19aa1c13f5336500d351457badc39dd5fa11cfb
treed3862cc42dcb59f63d9f658a182f71c583f5e3ed
parentf69db5e4130c9d60b33e8ce8fed4bad8c94b60af
chance: Avoid abuse of O_NONBLOCK for Windows

O_NONBLOCK from src/lib/w32/w32misc.h is stricly for use with our
fcntl().  pick_seed() passes it to open(), which is wrong.  With any
luck, open() fails as it should anyway (the files being opened are not
expected to exist under Windows).  Messed up in commit 9102ecce5 "Fix
PRNG seeding to resist guessing", v4.3.31.

Clean up: guard with #ifndef _WIN32.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/gen/chance.c