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

22 lines
774 B
Plaintext
Raw Normal View History

$OpenBSD: patch-third-party_libevent_test_bench_c,v 1.2 2008/12/02 15:29:07 naddy Exp $
--- third-party/libevent/test/bench.c.orig Mon Nov 10 16:52:42 2008
+++ third-party/libevent/test/bench.c Thu Nov 27 22:29:11 2008
2008-07-09 15:43:42 -04:00
@@ -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);
}