From b78296197d7ec97f2ba57de74a2190ecfa55c890 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sat, 16 Dec 2017 20:46:58 -0700 Subject: [PATCH] Fix compilation error on FreeBSD --- plugins/sudoers/starttime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/sudoers/starttime.c b/plugins/sudoers/starttime.c index 644c6ef9a..a142df16f 100644 --- a/plugins/sudoers/starttime.c +++ b/plugins/sudoers/starttime.c @@ -108,9 +108,9 @@ get_starttime(pid_t pid, struct timespec *starttime) } while (rc == -1 && errno == ENOMEM); if (rc != -1) { #if defined(HAVE_STRUCT_KINFO_PROC_KI_TDEV) - /* FreeBSD and macOS */ - starttime->tv_sec = ki_proc->ki_start->tv_sec; - starttime->tv_nsec = ki_proc->ki_start->tv_usec / 1000; + /* FreeBSD and Dragonfly */ + starttime->tv_sec = ki_proc->ki_start.tv_sec; + starttime->tv_nsec = ki_proc->ki_start.tv_usec / 1000; #else /* NetBSD and OpenBSD */ starttime->tv_sec = ki_proc->p_ustart_sec; -- 2.40.0