[PATCH:libxtrans 1/2] Add stubs for send/recv fd functions in local transports

Alan Coopersmith alan.coopersmith at oracle.com
Thu Nov 7 11:09:03 PST 2013


Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 Xtranslcl.c |   35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/Xtranslcl.c b/Xtranslcl.c
index 5beef7c..4deb86c 100644
--- a/Xtranslcl.c
+++ b/Xtranslcl.c
@@ -140,6 +140,21 @@ TRANS(ReopenFail)(XtransConnInfo ciptr _X_UNUSED, int fd _X_UNUSED, char *port _
 
 #endif /* TRANS_REOPEN */
 
+#if XTRANS_SEND_FDS
+static int
+TRANS(LocalRecvFdInvalid)(XtransConnInfo ciptr)
+{
+    errno = EINVAL;
+    return -1;
+}
+
+static int
+TRANS(LocalSendFdInvalid)(XtransConnInfo ciptr, int fd, int do_close)
+{
+    errno = EINVAL;
+    return -1;
+}
+#endif
 
 
 static int
@@ -2368,6 +2383,10 @@ Xtransport	TRANS(LocalFuncs) = {
 	TRANS(LocalWrite),
 	TRANS(LocalReadv),
 	TRANS(LocalWritev),
+#if XTRANS_SEND_FDS
+	TRANS(LocalSendFdInvalid),
+	TRANS(LocalRecvFdInvalid),
+#endif
 	TRANS(LocalDisconnect),
 	TRANS(LocalClose),
 	TRANS(LocalCloseForCloning),
@@ -2410,6 +2429,10 @@ Xtransport	TRANS(PTSFuncs) = {
 	TRANS(LocalWrite),
 	TRANS(LocalReadv),
 	TRANS(LocalWritev),
+#if XTRANS_SEND_FDS
+	TRANS(LocalSendFdInvalid),
+	TRANS(LocalRecvFdInvalid),
+#endif
 	TRANS(LocalDisconnect),
 	TRANS(LocalClose),
 	TRANS(LocalCloseForCloning),
@@ -2454,6 +2477,10 @@ Xtransport	TRANS(NAMEDFuncs) = {
 	TRANS(LocalWrite),
 	TRANS(LocalReadv),
 	TRANS(LocalWritev),
+#if XTRANS_SEND_FDS
+	TRANS(LocalSendFdInvalid),
+	TRANS(LocalRecvFdInvalid),
+#endif
 	TRANS(LocalDisconnect),
 	TRANS(LocalClose),
 	TRANS(LocalCloseForCloning),
@@ -2495,6 +2522,10 @@ Xtransport	TRANS(PIPEFuncs) = {
 	TRANS(LocalWrite),
 	TRANS(LocalReadv),
 	TRANS(LocalWritev),
+#if XTRANS_SEND_FDS
+	TRANS(LocalSendFdInvalid),
+	TRANS(LocalRecvFdInvalid),
+#endif
 	TRANS(LocalDisconnect),
 	TRANS(LocalClose),
 	TRANS(LocalCloseForCloning),
@@ -2539,6 +2570,10 @@ Xtransport	TRANS(SCOFuncs) = {
 	TRANS(LocalWrite),
 	TRANS(LocalReadv),
 	TRANS(LocalWritev),
+#if XTRANS_SEND_FDS
+	TRANS(LocalSendFdInvalid),
+	TRANS(LocalRecvFdInvalid),
+#endif
 	TRANS(LocalDisconnect),
 	TRANS(LocalClose),
 	TRANS(LocalCloseForCloning),
-- 
1.7.9.2



More information about the xorg-devel mailing list