--- libaitsched/src/hooks.c 2011/10/04 14:04:35 1.2.2.3 +++ libaitsched/src/hooks.c 2011/10/04 23:03:32 1.2.2.4 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: hooks.c,v 1.2.2.3 2011/10/04 14:04:35 misho Exp $ +* $Id: hooks.c,v 1.2.2.4 2011/10/04 23:03:32 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -337,7 +337,7 @@ retry: switch (res[i].filter) { case EVFILT_READ: TAILQ_FOREACH(task, &r->root_read, task_node) { - if (TASK_FD(task) != ((int) res[i].udata)) + if (TASK_FD(task) != ((intptr_t) res[i].udata)) continue; /* remove read handle */ io = ROOT_DATA(task->task_root); @@ -361,7 +361,7 @@ retry: break; case EVFILT_WRITE: TAILQ_FOREACH(task, &r->root_write, task_node) { - if (TASK_FD(task) != ((int) res[i].udata)) + if (TASK_FD(task) != ((intptr_t) res[i].udata)) continue; /* remove write handle */ io = ROOT_DATA(task->task_root); @@ -451,7 +451,7 @@ sched_hook_exception(void *root, void *arg) /* if error hook exists */ if (r->root_hooks.hook_root.error) - return (r->root_hooks.hook_root.error(root, (void*) errno)); + return (r->root_hooks.hook_root.error(root, (void*) ((intptr_t) errno))); /* default case! */ LOGERR;