Binder unique_fd
Test: mma
Bug: 302723053
Change-Id: I52f14cadb027b3f854946d5315dce3d23aa21b19
diff --git a/libs/binder/RpcTransportRaw.cpp b/libs/binder/RpcTransportRaw.cpp
index ffa3151..aa3a6e5 100644
--- a/libs/binder/RpcTransportRaw.cpp
+++ b/libs/binder/RpcTransportRaw.cpp
@@ -19,6 +19,7 @@
#include <poll.h>
#include <stddef.h>
+#include <sys/socket.h>
#include <binder/RpcTransportRaw.h>
@@ -30,6 +31,8 @@
namespace android {
using namespace android::binder::impl;
+using android::binder::borrowed_fd;
+using android::binder::unique_fd;
// RpcTransport with TLS disabled.
class RpcTransportRaw : public RpcTransport {
@@ -57,8 +60,7 @@
status_t interruptableWriteFully(
FdTrigger* fdTrigger, iovec* iovs, int niovs,
const std::optional<SmallFunction<status_t()>>& altPoll,
- const std::vector<std::variant<base::unique_fd, base::borrowed_fd>>* ancillaryFds)
- override {
+ const std::vector<std::variant<unique_fd, borrowed_fd>>* ancillaryFds) override {
bool sentFds = false;
auto send = [&](iovec* iovs, int niovs) -> ssize_t {
ssize_t ret = binder::os::sendMessageOnSocket(mSocket, iovs, niovs,
@@ -73,7 +75,7 @@
status_t interruptableReadFully(
FdTrigger* fdTrigger, iovec* iovs, int niovs,
const std::optional<SmallFunction<status_t()>>& altPoll,
- std::vector<std::variant<base::unique_fd, base::borrowed_fd>>* ancillaryFds) override {
+ std::vector<std::variant<unique_fd, borrowed_fd>>* ancillaryFds) override {
auto recv = [&](iovec* iovs, int niovs) -> ssize_t {
return binder::os::receiveMessageFromSocket(mSocket, iovs, niovs, ancillaryFds);
};