diff options
author | Adam Jackson <ajax@redhat.com> | 2018-03-08 11:13:16 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2018-03-08 14:12:36 -0500 |
commit | f69cd2024ef25e7fd2bd2d7012e33ce16eeb79ff (patch) | |
tree | 1d69e194b8f54cfc7d95317a6a455d67a2f490fa /os | |
parent | 90e0cdd42dfda2accfadffa5c550712696902e14 (diff) |
os: Define {ReadFdFrom,WriteFdTo}Client unconditionally
Otherwise this is broken on cygwin:
rrlease.c: In function ‘ProcRRCreateLease’:
rrlease.c:305:9: error: implicit declaration of function ‘WriteFdToClient’ [-Werror=implicit-function-declaration]
if (WriteFdToClient(client, fd, TRUE) < 0) {
Signed-off-by: Adam Jackson <ajax@redhat.com>
Diffstat (limited to 'os')
-rw-r--r-- | os/io.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -464,12 +464,12 @@ ReadRequestFromClient(ClientPtr client) return needed; } -#if XTRANS_SEND_FDS int ReadFdFromClient(ClientPtr client) { int fd = -1; +#if XTRANS_SEND_FDS if (client->req_fds > 0) { OsCommPtr oc = (OsCommPtr) client->osPrivate; @@ -477,17 +477,22 @@ ReadFdFromClient(ClientPtr client) fd = _XSERVTransRecvFd(oc->trans_conn); } else LogMessage(X_ERROR, "Request asks for FD without setting req_fds\n"); +#endif + return fd; } int WriteFdToClient(ClientPtr client, int fd, Bool do_close) { +#if XTRANS_SEND_FDS OsCommPtr oc = (OsCommPtr) client->osPrivate; return _XSERVTransSendFd(oc->trans_conn, fd, do_close); -} +#else + return -1; #endif +} /***************************************************************** * InsertFakeRequest |