mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Fix arc4random compilation on MSVC.
This commit is contained in:
parent
1e14f82669
commit
98edb891f8
@ -14,7 +14,7 @@ LIBFLAGS=/nologo
|
||||
CORE_OBJS=event.obj buffer.obj bufferevent.obj bufferevent_sock.obj \
|
||||
bufferevent_pair.obj listener.obj evmap.obj log.obj evutil.obj \
|
||||
strlcpy.obj signal.obj bufferevent_filter.obj evthread.obj \
|
||||
bufferevent_ratelim.obj
|
||||
bufferevent_ratelim.obj evutil_rand.obj
|
||||
WIN_OBJS=win32select.obj evthread_win32.obj buffer_iocp.obj \
|
||||
event_iocp.obj bufferevent_async.obj
|
||||
EXTRA_OBJS=event_tagging.obj http.obj evdns.obj evrpc.obj
|
||||
|
@ -74,6 +74,11 @@ struct arc4_stream {
|
||||
unsigned char s[256];
|
||||
};
|
||||
|
||||
#ifdef WIN32
|
||||
#define getpid _getpid
|
||||
#define pid_t int
|
||||
#endif
|
||||
|
||||
static int rs_initialized;
|
||||
static struct arc4_stream rs;
|
||||
static pid_t arc4_stir_pid;
|
||||
@ -217,9 +222,6 @@ arc4_stir(void)
|
||||
arc4_count = BYTES_BEFORE_RESEED;
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
#define getpid _getpid
|
||||
#endif
|
||||
|
||||
static void
|
||||
arc4_stir_if_needed(void)
|
||||
|
Loading…
x
Reference in New Issue
Block a user