mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
Support for DragonFly BSD (Hasso Tepper)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6746 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
9399f095bd
commit
c5e97233e8
11 changed files with 52 additions and 17 deletions
8
vl.c
8
vl.c
|
@ -55,7 +55,7 @@
|
|||
#include <sys/select.h>
|
||||
#ifdef _BSD
|
||||
#include <sys/stat.h>
|
||||
#ifdef __FreeBSD__
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
#include <libutil.h>
|
||||
#else
|
||||
#include <util.h>
|
||||
|
@ -759,7 +759,8 @@ static int use_rt_clock;
|
|||
static void init_get_clock(void)
|
||||
{
|
||||
use_rt_clock = 0;
|
||||
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
|
||||
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000) \
|
||||
|| defined(__DragonFly__)
|
||||
{
|
||||
struct timespec ts;
|
||||
if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0) {
|
||||
|
@ -771,7 +772,8 @@ static void init_get_clock(void)
|
|||
|
||||
static int64_t get_clock(void)
|
||||
{
|
||||
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000)
|
||||
#if defined(__linux__) || (defined(__FreeBSD__) && __FreeBSD_version >= 500000) \
|
||||
|| defined(__DragonFly__)
|
||||
if (use_rt_clock) {
|
||||
struct timespec ts;
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue