Revision d63c9477
b/include/glib-compat.h | ||
---|---|---|
1 |
/* |
|
2 |
* GLIB Compatibility Functions |
|
3 |
* |
|
4 |
* Copyright IBM, Corp. 2013 |
|
5 |
* |
|
6 |
* Authors: |
|
7 |
* Anthony Liguori <aliguori@us.ibm.com> |
|
8 |
* |
|
9 |
* This work is licensed under the terms of the GNU GPL, version 2 or later. |
|
10 |
* See the COPYING file in the top-level directory. |
|
11 |
* |
|
12 |
*/ |
|
13 |
|
|
14 |
#ifndef QEMU_GLIB_COMPAT_H |
|
15 |
#define QEMU_GLIB_COMPAT_H |
|
16 |
|
|
17 |
#include <glib.h> |
|
18 |
|
|
19 |
#if !GLIB_CHECK_VERSION(2, 14, 0) |
|
20 |
static inline guint g_timeout_add_seconds(guint interval, GSourceFunc function, |
|
21 |
gpointer data) |
|
22 |
{ |
|
23 |
return g_timeout_add(interval * 1000, function, data); |
|
24 |
} |
|
25 |
#endif |
|
26 |
|
|
27 |
#endif |
b/include/qemu-common.h | ||
---|---|---|
40 | 40 |
#include <sys/time.h> |
41 | 41 |
#include <assert.h> |
42 | 42 |
#include <signal.h> |
43 |
#include <glib.h>
|
|
43 |
#include "glib-compat.h"
|
|
44 | 44 |
|
45 | 45 |
#ifdef _WIN32 |
46 | 46 |
#include "sysemu/os-win32.h" |
Also available in: Unified diff