Commit 33ef55bd96d89b3259922438a7c45958438e364c
1 parent
3fffc223
Mingw build fix, by Johannes Schindelin.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2380 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
4 additions
and
2 deletions
vl.c
... | ... | @@ -1875,6 +1875,7 @@ static CharDriverState *qemu_chr_open_pty(void) |
1875 | 1875 | |
1876 | 1876 | #ifdef _WIN32 |
1877 | 1877 | typedef struct { |
1878 | + CharDriverState *chr; | |
1878 | 1879 | int max_size; |
1879 | 1880 | HANDLE hcom, hrecv, hsend; |
1880 | 1881 | OVERLAPPED orecv, osend; |
... | ... | @@ -1916,7 +1917,7 @@ static void win_chr_close(CharDriverState *chr) |
1916 | 1917 | win_chr_close2(s); |
1917 | 1918 | } |
1918 | 1919 | |
1919 | -static int win_chr_init(WinCharState *s, const char *filename) | |
1920 | +static int win_chr_init(WinCharState *s, CharDriverState *chr, const char *filename) | |
1920 | 1921 | { |
1921 | 1922 | COMMCONFIG comcfg; |
1922 | 1923 | COMMTIMEOUTS cto = { 0, 0, 0, 0, 0}; |
... | ... | @@ -1974,6 +1975,7 @@ static int win_chr_init(WinCharState *s, const char *filename) |
1974 | 1975 | fprintf(stderr, "Failed ClearCommError\n"); |
1975 | 1976 | goto fail; |
1976 | 1977 | } |
1978 | + s->chr = chr; | |
1977 | 1979 | qemu_add_polling_cb(win_chr_poll, s); |
1978 | 1980 | return 0; |
1979 | 1981 | |
... | ... | @@ -2086,7 +2088,7 @@ static CharDriverState *qemu_chr_open_win(const char *filename) |
2086 | 2088 | chr->chr_write = win_chr_write; |
2087 | 2089 | chr->chr_close = win_chr_close; |
2088 | 2090 | |
2089 | - if (win_chr_init(s, filename) < 0) { | |
2091 | + if (win_chr_init(s, chr, filename) < 0) { | |
2090 | 2092 | free(s); |
2091 | 2093 | free(chr); |
2092 | 2094 | return NULL; | ... | ... |