mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
util: implement virProcessGetStartTime on GNU/kFreeBSD
Use the virProcessGetStartTime implementation also when only the kernel is FreeBSD, such as on GNU/kFreeBSD.
This commit is contained in:
parent
8c5d7c7a2c
commit
10fe8d0668
@ -36,11 +36,11 @@
|
|||||||
# include <sched.h>
|
# include <sched.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || HAVE_BSD_CPU_AFFINITY
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || HAVE_BSD_CPU_AFFINITY
|
||||||
# include <sys/param.h>
|
# include <sys/param.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __FreeBSD__
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||||
# include <sys/sysctl.h>
|
# include <sys/sysctl.h>
|
||||||
# include <sys/user.h>
|
# include <sys/user.h>
|
||||||
#endif
|
#endif
|
||||||
@ -937,7 +937,7 @@ int virProcessGetStartTime(pid_t pid,
|
|||||||
VIR_FREE(buf);
|
VIR_FREE(buf);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
||||||
int virProcessGetStartTime(pid_t pid,
|
int virProcessGetStartTime(pid_t pid,
|
||||||
unsigned long long *timestamp)
|
unsigned long long *timestamp)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user