mirror of
https://github.com/RGBCube/serenity
synced 2025-07-29 12:47:47 +00:00
Ports: Update openssh's patches to use git patches
This commit is contained in:
parent
7077ce7779
commit
6e5509183f
9 changed files with 177 additions and 21 deletions
|
@ -0,0 +1,49 @@
|
|||
From 80b391147785edcbf2e1267104e24087ffb420df Mon Sep 17 00:00:00 2001
|
||||
From: Gunnar Beutner <gbeutner@serenityos.org>
|
||||
Date: Sat, 30 Apr 2022 10:58:10 +0000
|
||||
Subject: [PATCH 6/7] Use sendfd/recvfd on serenity
|
||||
|
||||
Co-Authored-By: Patrick Meyer <git@the-space.agency>
|
||||
---
|
||||
monitor_fdpass.c | 8 ++++++++
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/monitor_fdpass.c b/monitor_fdpass.c
|
||||
index a07727a..ad6774e 100644
|
||||
--- a/monitor_fdpass.c
|
||||
+++ b/monitor_fdpass.c
|
||||
@@ -51,6 +51,7 @@
|
||||
int
|
||||
mm_send_fd(int sock, int fd)
|
||||
{
|
||||
+#ifndef __serenity__
|
||||
#if defined(HAVE_SENDMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR))
|
||||
struct msghdr msg;
|
||||
#ifndef HAVE_ACCRIGHTS_IN_MSGHDR
|
||||
@@ -106,11 +107,15 @@ mm_send_fd(int sock, int fd)
|
||||
error("%s: file descriptor passing not supported", __func__);
|
||||
return -1;
|
||||
#endif
|
||||
+#else
|
||||
+ return sendfd(sock, fd);
|
||||
+#endif
|
||||
}
|
||||
|
||||
int
|
||||
mm_receive_fd(int sock)
|
||||
{
|
||||
+#ifndef __serenity__
|
||||
#if defined(HAVE_RECVMSG) && (defined(HAVE_ACCRIGHTS_IN_MSGHDR) || defined(HAVE_CONTROL_IN_MSGHDR))
|
||||
struct msghdr msg;
|
||||
#ifndef HAVE_ACCRIGHTS_IN_MSGHDR
|
||||
@@ -182,4 +187,7 @@ mm_receive_fd(int sock)
|
||||
error_f("file descriptor passing not supported");
|
||||
return -1;
|
||||
#endif
|
||||
+#else
|
||||
+ return recvfd(sock, 0);
|
||||
+#endif
|
||||
}
|
||||
--
|
||||
2.36.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue