diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 3981dcb30925..4113dc1fbe1a 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -523,11 +523,14 @@ knote_fork(struct knlist *list, int pid) * XXX: EVFILT_TIMER should perhaps live in kern_time.c beside the * interval timer support code. */ -static __inline sbintime_t +static __inline sbintime_t timer2sbintime(intptr_t data) { - if (data > LLONG_MAX / SBT_1MS) - return LLONG_MAX; + +#ifdef __LP64__ + if (data > INT64_MAX / SBT_1MS) + return INT64_MAX; +#endif return (SBT_1MS * data); }