aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-11-22 02:06:28 +0400
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-01-14 00:44:29 +0100
commite6dbff3fb8d2d7ce6cfad54b0c1d767d908bd791 (patch)
tree24475af73df02e8e7439d546fb11106dec7f7a41 /net
parent4246e8cac719317476f5652975f1a4d537b75770 (diff)
downloadqemu-e6dbff3fb8d2d7ce6cfad54b0c1d767d908bd791.zip
qemu-e6dbff3fb8d2d7ce6cfad54b0c1d767d908bd791.tar.gz
qemu-e6dbff3fb8d2d7ce6cfad54b0c1d767d908bd791.tar.bz2
slirp: add clock_get_ns() callback
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Diffstat (limited to 'net')
-rw-r--r--net/slirp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/slirp.c b/net/slirp.c
index 2d5337d..f98425e 100644
--- a/net/slirp.c
+++ b/net/slirp.c
@@ -146,9 +146,15 @@ static void net_slirp_guest_error(const char *msg)
qemu_log_mask(LOG_GUEST_ERROR, "%s", msg);
}
+static int64_t net_slirp_clock_get_ns(void)
+{
+ return qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL);
+}
+
static const SlirpCb slirp_cb = {
.output = net_slirp_output,
.guest_error = net_slirp_guest_error,
+ .clock_get_ns = net_slirp_clock_get_ns,
};
static int net_slirp_init(NetClientState *peer, const char *model,