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];
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);
#include <sys/select.h>
#endif
+#include <sys/filio.h>
+
#ifdef __FreeBSD__
#ifndef SOL_TCP
#define SOL_TCP IPPROTO_TCP
#ifndef _WIN32
#include <sys/select.h>
-#include <sys/signal.h>
+#include <signal.h>
#endif
#include "shadow.h"
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)
#ifndef _WIN32
+#include <alloca.h>
#include <time.h>
#include <sys/time.h>
#include <sys/wait.h>
#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