mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibIPC: Remove platform-specific #ifdefs around FD passing in Connection
Let the LocalSocket class decide if FD passing is supported or not.
This commit is contained in:
parent
4d762fd3a6
commit
35966cabe4
Notes:
sideshowbarker
2024-07-17 06:20:47 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/35966cabe4
1 changed files with 0 additions and 5 deletions
|
@ -48,17 +48,12 @@ ErrorOr<void> ConnectionBase::post_message(MessageBuffer buffer)
|
|||
uint32_t message_size = buffer.data.size();
|
||||
TRY(buffer.data.try_prepend(reinterpret_cast<u8 const*>(&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;
|
||||
|
|
Loading…
Reference in a new issue