From 902320eeacc61f05a65e7185eb3357a01ca9a0e1 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 11 Feb 2025 11:59:07 +0100 Subject: [PATCH] io: unexport ReadFdFromClient() Not used by any drivers (and really shouldn't be used by them), so no need to keep it exported. Signed-off-by: Enrico Weigelt, metux IT consult --- Xext/shm.c | 1 + dri3/dri3_request.c | 1 + include/os.h | 2 -- os/io.c | 1 + os/io_priv.h | 17 +++++++++++++++++ 5 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 os/io_priv.h diff --git a/Xext/shm.c b/Xext/shm.c index f65fb3fa0..1a8370897 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -46,6 +46,7 @@ in this Software without prior written authorization from The Open Group. #include "miext/extinit_priv.h" #include "os/auth.h" #include "os/busfault.h" +#include "os/io_priv.h" #include "os/log_priv.h" #include "os/osdep.h" diff --git a/dri3/dri3_request.c b/dri3/dri3_request.c index 91240be45..057397a40 100644 --- a/dri3/dri3_request.c +++ b/dri3/dri3_request.c @@ -24,6 +24,7 @@ #include #include "dix/dix_priv.h" +#include "os/io_priv.h" #include "dri3_priv.h" #include diff --git a/include/os.h b/include/os.h index 1f7876fd9..374f0b9ed 100644 --- a/include/os.h +++ b/include/os.h @@ -86,8 +86,6 @@ typedef struct _NewClientRec *NewClientPtr; extern _X_EXPORT int ReadRequestFromClient(ClientPtr /*client */ ); -extern _X_EXPORT int ReadFdFromClient(ClientPtr client); - extern _X_EXPORT int WriteFdToClient(ClientPtr client, int fd, Bool do_close); extern _X_EXPORT Bool InsertFakeRequest(ClientPtr /*client */ , diff --git a/os/io.c b/os/io.c index e529f489e..6a3dcd209 100644 --- a/os/io.c +++ b/os/io.c @@ -74,6 +74,7 @@ SOFTWARE. #include #include "dix/dix_priv.h" +#include "os/io_priv.h" #include "os.h" #include "osdep.h" diff --git a/os/io_priv.h b/os/io_priv.h new file mode 100644 index 000000000..57b771ef1 --- /dev/null +++ b/os/io_priv.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: MIT OR X11 + * + * Copyright © 2024 Enrico Weigelt, metux IT consult + */ +#ifndef __XORG_OS_IO_H +#define __XORG_OS_IO_H + +#include "include/os.h" + +/** + * Read an file descriptor that client should have sent (along with request). + * + * Caller must have set the number of expected FDs via SetReqFds() before. + */ +int ReadFdFromClient(ClientPtr client); + +#endif /* __XORG_OS_IO_H */