From: Mathieu Desnoyers Date: Thu, 24 May 2012 17:46:21 +0000 (-0400) Subject: compat socket.h: add cygwin support X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d59cedb315b0238f8669325290654c83cbeb10e8;p=lttng-tools.git compat socket.h: add cygwin support commit 5db8b7b1b6c49bfb25ffc438c95941eecee060f5 upstream. Signed-off-by: Mathieu Desnoyers Signed-off-by: Christian Babeux --- diff --git a/src/common/compat/socket.h b/src/common/compat/socket.h index 69a91885e..4d2925f3b 100644 --- a/src/common/compat/socket.h +++ b/src/common/compat/socket.h @@ -37,7 +37,7 @@ typedef struct ucred lttng_sock_cred; #define LTTNG_SOCK_GET_GID_CRED(c) LTTNG_REF(c)->gid #define LTTNG_SOCK_GET_PID_CRED(c) LTTNG_REF(c)->pid -#elif defined(__FreeBSD__) +#elif (defined(__FreeBSD__) || defined(__CYGWIN__)) struct lttng_sock_cred { uid_t uid; diff --git a/src/common/sessiond-comm/sessiond-comm.c b/src/common/sessiond-comm/sessiond-comm.c index a14131cda..b762694e5 100644 --- a/src/common/sessiond-comm/sessiond-comm.c +++ b/src/common/sessiond-comm/sessiond-comm.c @@ -583,7 +583,7 @@ ssize_t lttcomm_recv_creds_unix_sock(int sock, void *buf, size_t len, } memcpy(creds, CMSG_DATA(cmptr), sizeof_cred); -#elif defined(__FreeBSD__) +#elif (defined(__FreeBSD__) || defined(__CYGWIN__)) { int peer_ret; @@ -615,7 +615,7 @@ int lttcomm_setsockopt_creds_unix_sock(int sock) } return ret; } -#elif defined(__FreeBSD__) +#elif (defined(__FreeBSD__) || defined(__CYGWIN__)) int lttcomm_setsockopt_creds_unix_sock(int sock) { return 0;