Merge pull request #2355 from xsumbe00/master

Fixes some build issues on Solaris 11.
This commit is contained in:
Marc-André Moreau 2015-02-04 11:34:02 -05:00
commit 8f8676a20e
6 changed files with 11 additions and 8 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

@ -6,7 +6,7 @@ elseif((CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|AMD64") AND (CMAKE_SIZEOF_VOID_P
elseif((CMAKE_SYSTEM_PROCESSOR MATCHES "i386") AND (CMAKE_SIZEOF_VOID_P EQUAL 8) AND (APPLE))
# Mac is weird like that.
set(TARGET_ARCH "x64")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "arm*")
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm*")
set(TARGET_ARCH "ARM")
endif()

View File

@ -51,6 +51,10 @@
#include <sys/select.h>
#endif
#ifdef HAVE_SYS_FILIO_H
#include <sys/filio.h>
#endif
#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