Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4a1da792 authored by Josh Gao's avatar Josh Gao
Browse files

adbconnection: delete unnecessary darwin workaround.

This shouldn't be compiling for the mac.

Test: none
Change-Id: I9aea1861365c0da041c665e14e3e86cb802ad697
parent b416a925
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -122,16 +122,7 @@ AdbConnectionClientContext* adbconnection_client_new(
    return nullptr;
  }

#if defined(__APPLE__)
  ctx->control_socket_.reset(socket(AF_UNIX, SOCK_SEQPACKET, 0));
  // TODO: find a better home for all these copies of the mac CLOEXEC workaround.
  if (int fd = ctx->control_socket_.get(), flags = fcntl(fd, F_GETFD);
      flags != -1 && (flags & FD_CLOEXEC) == 0) {
    fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
  }
#else
  ctx->control_socket_.reset(socket(AF_UNIX, SOCK_SEQPACKET | SOCK_CLOEXEC, 0));
#endif
  if (ctx->control_socket_ < 0) {
    PLOG(ERROR) << "failed to create Unix domain socket";
    return nullptr;