diff options
author | Azat Khuzhin <azat@libevent.org> | 2021-04-27 09:03:42 +0300 |
---|---|---|
committer | Azat Khuzhin <azat@libevent.org> | 2021-04-27 09:04:01 +0300 |
commit | 86ae44ce4d7a8062b173188ac1f0b1cac3aec67b (patch) | |
tree | 0ba174129f6867e9c636fd5fe27fdd03b4fec836 /arc4random.c | |
parent | 4f8a61446c1b76ae6e6f9cb0a1e231b669412082 (diff) | |
download | libevent-86ae44ce4d7a8062b173188ac1f0b1cac3aec67b.tar.gz |
Fix O_RDONLY (_O_RDONLY) under mingw
O_RDONLY is defined only if [1]:
!defined(NO_OLDNAMES) || defined(_POSIX)
[1]: https://github.com/Alexpux/mingw-w64/blob/d0d7f784833bbb0b2d279310ddc6afb52fe47a46/mingw-w64-headers/crt/fcntl.h#L35
Diffstat (limited to 'arc4random.c')
-rw-r--r-- | arc4random.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arc4random.c b/arc4random.c index cde22d0a..c36e3c11 100644 --- a/arc4random.c +++ b/arc4random.c @@ -89,6 +89,10 @@ struct arc4_stream { #define pid_t int #endif +#ifndef O_RDONLY +#define O_RDONLY _O_RDONLY +#endif + static int rs_initialized; static struct arc4_stream rs; static pid_t arc4_stir_pid; |