aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-13 21:08:25 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-10-13 21:08:25 +0000
commit60759371f0e08694bef702f4beaf0d35f932de42 (patch)
tree35f0d64ea666888b16d87cdb636a116ab66f46fc /vl.c
parent6556a833fa894bb9981dd273026d3615db1fffdc (diff)
FreeBSD also has clock_gettime
Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5481 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index 51ad857fca..97aca75179 100644
--- a/vl.c
+++ b/vl.c
@@ -733,7 +733,7 @@ static int use_rt_clock;
static void init_get_clock(void)
{
use_rt_clock = 0;
-#if defined(__linux__)
+#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
{
struct timespec ts;
if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) {
@@ -745,7 +745,7 @@ static void init_get_clock(void)
static int64_t get_clock(void)
{
-#if defined(__linux__)
+#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
if (use_rt_clock) {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);