Fixes some build issues on Solaris 11.
authorPetr Sumbera <petr.sumbera@sun.com>
Mon, 2 Feb 2015 16:48:54 +0000 (08:48 -0800)
committerPetr Sumbera <petr.sumbera@sun.com>
Mon, 2 Feb 2015 16:48:54 +0000 (08:48 -0800)
channels/drive/client/drive_file.c
libfreerdp/core/tcp.c
server/shadow/shadow_server.c
winpr/libwinpr/crt/string.c
winpr/libwinpr/synch/wait.c

index 5f3aa47..01bd79f 100644 (file)
@@ -487,7 +487,7 @@ BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UIN
        int status;
        char* fullpath;
        struct STAT st;
-#if defined(__linux__) && !defined(ANDROID)
+#if defined(__linux__) && !defined(ANDROID) || defined(sun)
        struct timespec tv[2];
 #else
        struct timeval tv[2];
@@ -519,7 +519,7 @@ BOOL drive_file_set_information(DRIVE_FILE* file, UINT32 FsInformationClass, UIN
                        tv[0].tv_usec = 0;
                        tv[1].tv_usec = 0;
                        utimes(file->fullpath, tv);
-#elif defined (__linux__)
+#elif defined (__linux__) || defined (sun)
                        tv[0].tv_nsec = 0;
                        tv[1].tv_nsec = 0;                      
                        futimens(file->fd, tv);
index c890356..a7f141d 100644 (file)
@@ -51,6 +51,8 @@
 #include <sys/select.h>
 #endif
 
+#include <sys/filio.h>
+
 #ifdef __FreeBSD__
 #ifndef SOL_TCP
 #define SOL_TCP        IPPROTO_TCP
index 48b0192..a0c560a 100644 (file)
@@ -34,7 +34,7 @@
 
 #ifndef _WIN32
 #include <sys/select.h>
-#include <sys/signal.h>
+#include <signal.h>
 #endif
 
 #include "shadow.h"
index 0fca34c..776167f 100644 (file)
@@ -57,9 +57,7 @@ WCHAR* _wcsdup(const WCHAR* strSource)
        if (strSource == NULL)
                return NULL;
 
-#if defined(sun) && sun
-       strDestination = wsdup(strSource);
-#elif defined(__APPLE__) && defined(__MACH__) || defined(ANDROID)
+#if defined(__APPLE__) && defined(__MACH__) || defined(ANDROID) || defined(sun)
        strDestination = malloc(wcslen((wchar_t*)strSource));
 
        if (strDestination != NULL)
index 73de29a..60918e3 100644 (file)
@@ -61,6 +61,7 @@
 
 #ifndef _WIN32
 
+#include <alloca.h>
 #include <time.h>
 #include <sys/time.h>
 #include <sys/wait.h>
@@ -108,7 +109,7 @@ static long long ts_difftime(const struct timespec *o,
 #if !defined(HAVE_PTHREAD_GNU_EXT)
 #include <pthread.h>
 
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(sun)
 /*the only way to get it work is to remove the static*/
 int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *timeout)
 #else