From: Mathieu Desnoyers Date: Thu, 24 May 2012 17:46:21 +0000 (-0400) Subject: compat socket.h: add cygwin support X-Git-Tag: v2.1.0-rc1~131 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=5db8b7b1b6c49bfb25ffc438c95941eecee060f5;p=lttng-tools.git compat socket.h: add cygwin support Signed-off-by: Mathieu Desnoyers --- 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 6ad4a3775..c0322b840 100644 --- a/src/common/sessiond-comm/sessiond-comm.c +++ b/src/common/sessiond-comm/sessiond-comm.c @@ -582,7 +582,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; @@ -614,7 +614,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;