2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 22:35:10 +00:00

Fix compilation error on FreeBSD

This commit is contained in:
Todd C. Miller
2017-12-16 20:46:58 -07:00
parent 79caf1e68d
commit b78296197d

View File

@@ -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;