From 5db8b7b1b6c49bfb25ffc438c95941eecee060f5 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Thu, 24 May 2012 13:46:21 -0400 Subject: [PATCH 1/1] compat socket.h: add cygwin support Signed-off-by: Mathieu Desnoyers --- src/common/compat/socket.h | 2 +- src/common/sessiond-comm/sessiond-comm.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; -- 2.34.1