From 62d584d63190c6c8cef5fd49d87b1cb29358a434 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 18 Mar 2014 22:05:58 -0700 Subject: [PATCH] os: Always compile ListenOnOpenFD() and export it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This function was written to allow the X server to inherit the listen socket from launchd on OS X. The code is not specific to OS X though and will be useful for on-demand launched Xwayland servers. Signed-off-by: Kristian Høgsberg Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone --- include/os.h | 4 +--- os/connection.c | 7 ++----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/include/os.h b/include/os.h index e5f86d67d..90229e672 100644 --- a/include/os.h +++ b/include/os.h @@ -166,9 +166,7 @@ extern _X_EXPORT void MakeClientGrabImpervious(ClientPtr /*client */ ); extern _X_EXPORT void MakeClientGrabPervious(ClientPtr /*client */ ); -#ifdef XQUARTZ -extern void ListenOnOpenFD(int /* fd */ , int /* noxauth */ ); -#endif +extern _X_EXPORT void ListenOnOpenFD(int /* fd */ , int /* noxauth */ ); extern _X_EXPORT CARD32 GetTimeInMillis(void); extern _X_EXPORT CARD64 GetTimeInMicros(void); diff --git a/os/connection.c b/os/connection.c index ddf4f0a3a..400c5425d 100644 --- a/os/connection.c +++ b/os/connection.c @@ -1253,8 +1253,7 @@ MakeClientGrabPervious(ClientPtr client) } } -#ifdef XQUARTZ -/* Add a fd (from launchd) to our listeners */ +/* Add a fd (from launchd or similar) to our listeners */ void ListenOnOpenFD(int fd, int noxauth) { @@ -1276,7 +1275,7 @@ ListenOnOpenFD(int fd, int noxauth) */ ciptr = _XSERVTransReopenCOTSServer(5, fd, port); if (ciptr == NULL) { - ErrorF("Got NULL while trying to Reopen launchd port.\n"); + ErrorF("Got NULL while trying to Reopen listen port.\n"); return; } @@ -1308,5 +1307,3 @@ ListenOnOpenFD(int fd, int noxauth) XdmcpReset(); #endif } - -#endif