os: Always compile ListenOnOpenFD() and export it

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 <krh@bitplanet.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
Kristian Høgsberg 2014-03-18 22:05:58 -07:00 committed by Peter Hutterer
parent 797781c7bf
commit 62d584d631
2 changed files with 3 additions and 8 deletions

View File

@ -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);

View File

@ -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