diff --git a/include/sudo_event.h b/include/sudo_event.h index bb508b3a7..61ada67ce 100644 --- a/include/sudo_event.h +++ b/include/sudo_event.h @@ -137,8 +137,8 @@ __dso_public int sudo_ev_set_v1(struct sudo_event *ev, int fd, short events, sud #define sudo_ev_set(_a, _b, _c, _d, _e) sudo_ev_set_v1((_a), (_b), (_c), (_d), (_e)) /* Add an event, returns 0 on success, -1 on error */ -__dso_public int sudo_ev_add_v1(struct sudo_event_base *head, struct sudo_event *ev, struct timeval *timo, bool tohead); -__dso_public int sudo_ev_add_v2(struct sudo_event_base *head, struct sudo_event *ev, struct timespec *timo, bool tohead); +__dso_public int sudo_ev_add_v1(struct sudo_event_base *head, struct sudo_event *ev, const struct timeval *timo, bool tohead); +__dso_public int sudo_ev_add_v2(struct sudo_event_base *head, struct sudo_event *ev, const struct timespec *timo, bool tohead); #define sudo_ev_add(_a, _b, _c, _d) sudo_ev_add_v2((_a), (_b), (_c), (_d)) /* Delete an event, returns 0 on success, -1 on error */ diff --git a/lib/util/event.c b/lib/util/event.c index 0cd89ad94..29374558d 100644 --- a/lib/util/event.c +++ b/lib/util/event.c @@ -454,7 +454,7 @@ sudo_ev_add_signal(struct sudo_event_base *base, struct sudo_event *ev, int sudo_ev_add_v1(struct sudo_event_base *base, struct sudo_event *ev, - struct timeval *timo, bool tohead) + const struct timeval *timo, bool tohead) { struct timespec tsbuf, *ts = NULL; @@ -468,7 +468,7 @@ sudo_ev_add_v1(struct sudo_event_base *base, struct sudo_event *ev, int sudo_ev_add_v2(struct sudo_event_base *base, struct sudo_event *ev, - struct timespec *timo, bool tohead) + const struct timespec *timo, bool tohead) { debug_decl(sudo_ev_add, SUDO_DEBUG_EVENT);