diff options
| -rw-r--r-- | libs/binder/RpcTransportTipcAndroid.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/binder/RpcTransportTipcAndroid.cpp b/libs/binder/RpcTransportTipcAndroid.cpp index 79983f46d3..c82201b28b 100644 --- a/libs/binder/RpcTransportTipcAndroid.cpp +++ b/libs/binder/RpcTransportTipcAndroid.cpp @@ -103,7 +103,10 @@ public: // read and call readFn as many times as needed to get all the data status_t ret = fillReadBuffer(); if (ret != OK) { - return ret; + // We need to emulate a Linux read call, which sets errno on + // error and returns -1 + errno = -ret; + return -1; } ssize_t processSize = 0; |