Xen: make events.c portable for ia64/xen support