aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-02 03:30:54 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-02 03:30:54 +0000
commit33ef55bd96d89b3259922438a7c45958438e364c (patch)
tree8deefaa5998b6e37dcefb271495f2bbf82d6b8ab
parent3fffc2234fc6551a78533fe544ba96106e58379a (diff)
downloadqemu-arm-33ef55bd96d89b3259922438a7c45958438e364c.tar.gz
Mingw build fix, by Johannes Schindelin.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2380 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--vl.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index daeec82e88..574452da83 100644
--- a/vl.c
+++ b/vl.c
@@ -1875,6 +1875,7 @@ static CharDriverState *qemu_chr_open_pty(void)
#ifdef _WIN32
typedef struct {
+ CharDriverState *chr;
int max_size;
HANDLE hcom, hrecv, hsend;
OVERLAPPED orecv, osend;
@@ -1916,7 +1917,7 @@ static void win_chr_close(CharDriverState *chr)
win_chr_close2(s);
}
-static int win_chr_init(WinCharState *s, const char *filename)
+static int win_chr_init(WinCharState *s, CharDriverState *chr, const char *filename)
{
COMMCONFIG comcfg;
COMMTIMEOUTS cto = { 0, 0, 0, 0, 0};
@@ -1974,6 +1975,7 @@ static int win_chr_init(WinCharState *s, const char *filename)
fprintf(stderr, "Failed ClearCommError\n");
goto fail;
}
+ s->chr = chr;
qemu_add_polling_cb(win_chr_poll, s);
return 0;
@@ -2086,7 +2088,7 @@ static CharDriverState *qemu_chr_open_win(const char *filename)
chr->chr_write = win_chr_write;
chr->chr_close = win_chr_close;
- if (win_chr_init(s, filename) < 0) {
+ if (win_chr_init(s, chr, filename) < 0) {
free(s);
free(chr);
return NULL;