Index: kern/kern_timeout.c =================================================================== RCS file: /cvs/src/sys/kern/kern_timeout.c,v diff -u -p -r1.97 kern_timeout.c --- kern/kern_timeout.c 23 Feb 2024 16:51:39 -0000 1.97 +++ kern/kern_timeout.c 5 Aug 2024 06:53:36 -0000 @@ -386,14 +386,17 @@ timeout_add_usec(struct timeout *to, int } int -timeout_add_nsec(struct timeout *to, int nsecs) +timeout_add_nsec(struct timeout *to, uint64_t nsecs) { - int to_ticks = nsecs / (tick * 1000); + uint64_t to_ticks; + to_ticks = nsecs / (tick * 1000); + if (to_ticks > INT_MAX) + to_ticks = INT_MAX; if (to_ticks == 0 && nsecs > 0) to_ticks = 1; - return timeout_add(to, to_ticks); + return timeout_add(to, (int)to_ticks); } int Index: sys/timeout.h =================================================================== RCS file: /cvs/src/sys/sys/timeout.h,v diff -u -p -r1.48 timeout.h --- sys/timeout.h 12 Oct 2023 15:32:38 -0000 1.48 +++ sys/timeout.h 5 Aug 2024 06:53:36 -0000 @@ -110,7 +110,7 @@ int timeout_add_tv(struct timeout *, con int timeout_add_sec(struct timeout *, int); int timeout_add_msec(struct timeout *, int); int timeout_add_usec(struct timeout *, int); -int timeout_add_nsec(struct timeout *, int); +int timeout_add_nsec(struct timeout *, uint64_t); int timeout_abs_ts(struct timeout *, const struct timespec *);