aboutsummaryrefslogtreecommitdiffstats
path: root/android/async-utils.c
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2011-02-07 14:14:14 -0800
committerVladimir Chtchetkine <vchtchetkine@google.com>2011-02-07 14:49:09 -0800
commit17ecca637df2f573edc3ecb8246c0e38a5b32465 (patch)
treebc05a46566ad888b4659b048851b1e32a9fb5b92 /android/async-utils.c
parent9af6946145bea73b16f1a128838048b917474f27 (diff)
downloadexternal_qemu-17ecca637df2f573edc3ecb8246c0e38a5b32465.zip
external_qemu-17ecca637df2f573edc3ecb8246c0e38a5b32465.tar.gz
external_qemu-17ecca637df2f573edc3ecb8246c0e38a5b32465.tar.bz2
Fix emulator core and UI on Windows
There are two parts in this CL: 1. Fixing the Windows build (missing set_fd_handler) 2. Replacing read/write with socket_recv/socket_send. Change-Id: I5fa599774260257d481b738a892e1124135fc319
Diffstat (limited to 'android/async-utils.c')
-rw-r--r--android/async-utils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/android/async-utils.c b/android/async-utils.c
index 678b0b4..a66e32f 100644
--- a/android/async-utils.c
+++ b/android/async-utils.c
@@ -40,7 +40,7 @@ asyncReader_read(AsyncReader* ar,
}
do {
- ret = read(io->fd, ar->buffer + ar->pos, ar->buffsize - ar->pos);
+ ret = socket_recv(io->fd, ar->buffer + ar->pos, ar->buffsize - ar->pos);
if (ret == 0) {
/* disconnection ! */
errno = ECONNRESET;
@@ -87,7 +87,7 @@ asyncWriter_write(AsyncWriter* aw,
}
do {
- ret = write(io->fd, aw->buffer + aw->pos, aw->buffsize - aw->pos);
+ ret = socket_send(io->fd, aw->buffer + aw->pos, aw->buffsize - aw->pos);
if (ret == 0) {
/* disconnection ! */
errno = ECONNRESET;
@@ -136,7 +136,7 @@ asyncLineReader_read(AsyncLineReader* alr,
do {
char ch;
- ret = read(io->fd, &ch, 1);
+ ret = socket_recv(io->fd, &ch, 1);
if (ret == 0) {
/* disconnection ! */
errno = ECONNRESET;
@@ -247,7 +247,7 @@ asyncConnector_run(AsyncConnector* ac, LoopIo* io)
/* We need to read the socket error to determine if
* the connection was really succesful or not. This
* is optional, because in case of error a future
- * read() or write() will fail anyway, but this
+ * socket_recv() or socket_send() will fail anyway, but this
* allows us to get a better error value as soon as
* possible.
*/