From 35966cabe4e03d2b1c39bc4f4862cfc24186abd2 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 5 Oct 2022 14:38:26 +0200 Subject: [PATCH] LibIPC: Remove platform-specific #ifdefs around FD passing in Connection Let the LocalSocket class decide if FD passing is supported or not. --- Userland/Libraries/LibIPC/Connection.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Userland/Libraries/LibIPC/Connection.cpp b/Userland/Libraries/LibIPC/Connection.cpp index 3f922d808f..f29ea1ecbd 100644 --- a/Userland/Libraries/LibIPC/Connection.cpp +++ b/Userland/Libraries/LibIPC/Connection.cpp @@ -48,17 +48,12 @@ ErrorOr ConnectionBase::post_message(MessageBuffer buffer) uint32_t message_size = buffer.data.size(); TRY(buffer.data.try_prepend(reinterpret_cast(&message_size), sizeof(message_size))); -#ifdef __serenity__ for (auto& fd : buffer.fds) { if (auto result = fd_passing_socket().send_fd(fd.value()); result.is_error()) { shutdown_with_error(result.error()); return result; } } -#else - if (!buffer.fds.is_empty()) - warnln("fd passing is not supported on this platform, sorry :("); -#endif ReadonlyBytes bytes_to_write { buffer.data.span() }; int writes_done = 0;