summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPino Toscano <ptoscano@redhat.com>2015-10-15 13:50:42 +0200
committerRoman Bogorodskiy <bogorodskiy@gmail.com>2015-10-27 19:08:03 +0300
commit10fe8d06688d7a8c201d4410e83ae443913a07b2 (patch)
tree1d52e0b6c15a3f51e8b70abb9ab1516047bf1a9e
parent8c5d7c7a2c3081c8c069dfb243389cc7aaed9b54 (diff)
downloadlibvirt-10fe8d06688d7a8c201d4410e83ae443913a07b2.tar.gz
util: implement virProcessGetStartTime on GNU/kFreeBSD
Use the virProcessGetStartTime implementation also when only the kernel is FreeBSD, such as on GNU/kFreeBSD.
-rw-r--r--src/util/virprocess.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/virprocess.c b/src/util/virprocess.c
index e6b78efbc3..43118f8903 100644
--- a/src/util/virprocess.c
+++ b/src/util/virprocess.c
@@ -36,11 +36,11 @@
# include <sched.h>
#endif
-#if defined(__FreeBSD__) || HAVE_BSD_CPU_AFFINITY
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || HAVE_BSD_CPU_AFFINITY
# include <sys/param.h>
#endif
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
# include <sys/sysctl.h>
# include <sys/user.h>
#endif
@@ -937,7 +937,7 @@ int virProcessGetStartTime(pid_t pid,
VIR_FREE(buf);
return ret;
}
-#elif defined(__FreeBSD__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
int virProcessGetStartTime(pid_t pid,
unsigned long long *timestamp)
{