f117eafcb4
Previously, kdump used the kernel-only timervalsub() macro which required defining _KERNEL when including <sys/time.h>. Now, kdump uses the existing userland API. The timercmp() usage to check for a backwards timestamp is also clearer and simpler than the previous code which checked the result of the subtraction for a negative value. While here, take advantage of the 3-arg timersub() to store the subtraction results in a tempory timeval instead of overwriting the timestamp in the ktrace record and then having to restore it.