diff options
author | Norikatsu Shigemura <nork@FreeBSD.org> | 2006-08-07 16:10:27 +0000 |
---|---|---|
committer | Norikatsu Shigemura <nork@FreeBSD.org> | 2006-08-07 16:10:27 +0000 |
commit | abffcb30ec97e8b7fe50b51b323a63201f83190d (patch) | |
tree | 14535343032cf24b54d2d185d006e38ee894f846 /emulators/qemu-devel/files/patch-be | |
parent | 826d991f606c4ee01defa9be677d6caf59f02f22 (diff) |
Notes
Diffstat (limited to 'emulators/qemu-devel/files/patch-be')
-rw-r--r-- | emulators/qemu-devel/files/patch-be | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/emulators/qemu-devel/files/patch-be b/emulators/qemu-devel/files/patch-be index 6de47db9eaf9..95877801237d 100644 --- a/emulators/qemu-devel/files/patch-be +++ b/emulators/qemu-devel/files/patch-be @@ -1,16 +1,31 @@ +Index: qemu/Makefile.target +@@ -404,7 +404,9 @@ + ifndef CONFIG_DARWIN + ifndef CONFIG_WIN32 + ifndef CONFIG_SOLARIS +-VL_LIBS=-lutil -lrt ++#VL_LIBS=-lutil -lrt ++# XXX this cant be just merged back... ++VL_LIBS=-lutil + endif + endif + endif Index: qemu/vl.c -@@ -662,6 +662,14 @@ - case QEMU_TIMER_REALTIME: - #ifdef _WIN32 - return GetTickCount(); -+#elif defined(_BSD) -+ { -+ struct timeval r; -+ if (!gettimeofday(&r, NULL)) { -+ return ((timer_freq * 1000LL) * (int64_t)r.tv_sec -+ + ((int64_t)r.tv_usec * timer_freq) / 1000) / timer_freq; -+ } -+ } - #else - { - struct tms tp; +@@ -541,7 +541,7 @@ + static void init_get_clock(void) + { + use_rt_clock = 0; +-#if defined(__linux__) ++#if defined(__linux__) || defined(__FreeBSD__) + { + struct timespec ts; + if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) { +@@ -553,7 +553,7 @@ + + static int64_t get_clock(void) + { +-#if defined(__linux__) ++#if defined(__linux__) || defined(__FreeBSD__) + if (use_rt_clock) { + struct timespec ts; + clock_gettime(CLOCK_MONOTONIC, &ts); |