From df2b5c9cdf3a68d9daa6947f7630ccc86215704e Mon Sep 17 00:00:00 2001 From: pentagra Date: Fri, 10 Feb 2017 18:06:20 +0300 Subject: [PATCH] ifdef's for Cygwin compilation --- channels/drive/client/drive_file.h | 2 +- channels/tsmf/client/gstreamer/tsmf_X11.c | 2 ++ winpr/include/winpr/library.h | 2 +- winpr/libwinpr/library/library.c | 2 +- winpr/libwinpr/winsock/winsock.c | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/channels/drive/client/drive_file.h b/channels/drive/client/drive_file.h index d287eb4ee..092e7d338 100644 --- a/channels/drive/client/drive_file.h +++ b/channels/drive/client/drive_file.h @@ -61,7 +61,7 @@ typedef UINT32 ssize_t; typedef UINT32 mode_t; -#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) +#elif defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__CYGWIN__) #define STAT stat #define OPEN open #define LSEEK lseek diff --git a/channels/tsmf/client/gstreamer/tsmf_X11.c b/channels/tsmf/client/gstreamer/tsmf_X11.c index e5228d6c8..89c2eed08 100644 --- a/channels/tsmf/client/gstreamer/tsmf_X11.c +++ b/channels/tsmf/client/gstreamer/tsmf_X11.c @@ -21,7 +21,9 @@ #include #include #include +#ifndef __CYGWIN__ #include +#endif #include #include diff --git a/winpr/include/winpr/library.h b/winpr/include/winpr/library.h index 2d191fb4e..34df3c7d2 100644 --- a/winpr/include/winpr/library.h +++ b/winpr/include/winpr/library.h @@ -60,7 +60,7 @@ WINPR_API HMODULE LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFl #endif -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(__CYGWIN__) #ifdef __cplusplus extern "C" { diff --git a/winpr/libwinpr/library/library.c b/winpr/libwinpr/library/library.c index c27d25698..91d537d8d 100644 --- a/winpr/libwinpr/library/library.c +++ b/winpr/libwinpr/library/library.c @@ -166,7 +166,7 @@ HMODULE LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags) #endif -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(__CYGWIN__) FARPROC GetProcAddress(HMODULE hModule, LPCSTR lpProcName) { diff --git a/winpr/libwinpr/winsock/winsock.c b/winpr/libwinpr/winsock/winsock.c index cd2b68b38..50bf1eb69 100644 --- a/winpr/libwinpr/winsock/winsock.c +++ b/winpr/libwinpr/winsock/winsock.c @@ -923,7 +923,7 @@ int WSAIoctl(SOCKET s, DWORD dwIoControlCode, LPVOID lpvInBuffer, next_ifreq: -#if !defined(__linux__) && !defined(__sun__) +#if !defined(__linux__) && !defined(__sun__) && !defined(__CYGWIN__) ifreq_len = IFNAMSIZ + ifreq->ifr_addr.sa_len; #else ifreq_len = sizeof(*ifreq);