#include "ui/console.h"
#include "sysemu/sysemu.h"
#include "qemu/timer.h"
-#include "char/char.h"
+#include "sysemu/char.h"
#include "hw/usb.h"
#include "qmp-commands.h"
gpointer user_data)
{
IOWatchPoll *iwp;
+ int tag;
iwp = (IOWatchPoll *) g_source_new(&io_watch_poll_funcs, sizeof(IOWatchPoll));
iwp->fd_can_read = fd_can_read;
iwp->fd_read = (GSourceFunc) fd_read;
iwp->src = NULL;
- return g_source_attach(&iwp->parent, NULL);
+ tag = g_source_attach(&iwp->parent, NULL);
+ g_source_unref(&iwp->parent);
+ return tag;
}
#ifndef _WIN32