]> granicus.if.org Git - libevent/commitdiff
Fix arc4random compilation on MSVC.
authorNick Mathewson <nickm@torproject.org>
Thu, 25 Feb 2010 22:14:41 +0000 (17:14 -0500)
committerNick Mathewson <nickm@torproject.org>
Thu, 25 Feb 2010 22:14:41 +0000 (17:14 -0500)
Makefile.nmake
arc4random.c

index 80a0c110880591b7b732c28bcefcdc629c29b454..da418e205ecde63a81a1ab2d60d15cfaef9ce9b6 100644 (file)
@@ -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
index c14fc536205727966ac6247af7da1f3f20f6da97..28f0cdbf54586afb0a1c14ab269eaac314c6e6b9 100644 (file)
@@ -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)