openbsd-ports/net/transmission/patches/patch-third-party_libevent_test_bench_c

22 lines
774 B
Plaintext
Raw Normal View History

2008-07-09 15:43:42 -04:00
$OpenBSD: patch-third-party_libevent_test_bench_c,v 1.1 2008/07/09 19:43:42 naddy Exp $
--- third-party/libevent/test/bench.c.orig Wed Jul 9 21:22:08 2008
+++ third-party/libevent/test/bench.c Wed Jul 9 21:22:27 2008
@@ -68,7 +68,7 @@ static struct event *events;
static void
read_cb(int fd, short which, void *arg)
{
- int idx = (int) arg, widx = idx + 1;
+ int idx = (int)(long) arg, widx = idx + 1;
u_char ch;
count += read(fd, &ch, sizeof(ch));
@@ -89,7 +89,7 @@ run_once(void)
for (cp = pipes, i = 0; i < num_pipes; i++, cp += 2) {
event_del(&events[i]);
- event_set(&events[i], cp[0], EV_READ | EV_PERSIST, read_cb, (void *) i);
+ event_set(&events[i], cp[0], EV_READ | EV_PERSIST, read_cb, (void *)(long) i);
event_add(&events[i], NULL);
}