]> granicus.if.org Git - libevent/commitdiff
Merge remote-tracking branch 'origin/patches-2.0'
authorNick Mathewson <nickm@torproject.org>
Thu, 19 Sep 2013 14:45:58 +0000 (10:45 -0400)
committerNick Mathewson <nickm@torproject.org>
Thu, 19 Sep 2013 14:45:58 +0000 (10:45 -0400)
Conflicts:
evutil_rand.c

1  2 
evutil_rand.c

diff --cc evutil_rand.c
index 0dcce7b68d28fe2cf20a64c98bbe1019b8e03d2f,4df685cacb6f2adaacf8bb3dd7376e4959fc7775..7e7e042be0f0b9538116bca425567635e555b9f3
@@@ -84,9 -76,11 +84,12 @@@ ev_arc4random_buf(void *buf, size_t n
         * and fall back otherwise.  (OSX does this using some linker
         * trickery.)
         */
-       if (arc4random_buf != NULL) {
-               arc4random_buf(buf, n);
-               return;
+       {
+               void (*tptr)() = (void*)arc4random_buf;
+               if (tptr != NULL) {
 -                      return arc4random_buf(buf, n);
++                      arc4random_buf(buf, n);
++                      return;
+               }
        }
  #endif
        /* Make sure that we start out with b at a 4-byte alignment; plenty