Fixes some build issues on Solaris 11.

This commit is contained in:
Petr Sumbera 2015-02-02 08:48:54 -08:00
parent 160a933837
commit 17df42e4b5
5 changed files with 8 additions and 7 deletions

View 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);

View File

@ -51,6 +51,8 @@
#include <sys/select.h>
#endif
#include <sys/filio.h>
#ifdef __FreeBSD__
#ifndef SOL_TCP
#define SOL_TCP IPPROTO_TCP

View File

@ -34,7 +34,7 @@
#ifndef _WIN32
#include <sys/select.h>
#include <sys/signal.h>
#include <signal.h>
#endif
#include "shadow.h"

View 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)

View 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