FreeBSD compile errors
This commit is contained in:
parent
02595df976
commit
03315cebe8
@ -40,6 +40,12 @@
|
||||
#include <netinet/tcp.h>
|
||||
#include <net/if.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
#ifndef SOL_TCP
|
||||
#define SOL_TCP IPPROTO_TCP
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifndef SOL_TCP
|
||||
#define SOL_TCP IPPROTO_TCP
|
||||
|
@ -1663,7 +1663,11 @@ void freerdp_time_zone_detect(TIME_ZONE_INFO* clientTimeZone)
|
||||
local_time = localtime(&t);
|
||||
|
||||
#ifdef HAVE_TM_GMTOFF
|
||||
clientTimeZone->bias = timezone / 60;
|
||||
#if defined(___FreeBSD__)
|
||||
clientTimeZone->bias = timezone;
|
||||
#else
|
||||
clientTimeZone->bias = timezone / 60;
|
||||
#endif
|
||||
DEBUG_TIMEZONE("tzname[std]: %s, tzname[dst]: %s, timezone: %ld, Daylight: %d", tzname[0], tzname[1], timezone, daylight);
|
||||
#elif defined(sun)
|
||||
if (local_time->tm_isdst > 0)
|
||||
|
@ -31,6 +31,8 @@
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <malloc/malloc.h>
|
||||
#elif __FreeBSD__
|
||||
#include <stdlib.h>
|
||||
#else
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
@ -124,7 +124,11 @@ static int pthread_timedjoin_np(pthread_t td, void **res,
|
||||
return ETIMEDOUT;
|
||||
}
|
||||
|
||||
static int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *timeout)
|
||||
#if defined(__FreeBSD__)
|
||||
static int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *timeout)
|
||||
#else
|
||||
static int pthread_mutex_timedlock(pthread_mutex_t *mutex, const struct timespec *timeout)
|
||||
#endif
|
||||
{
|
||||
struct timespec timenow;
|
||||
struct timespec sleepytime;
|
||||
|
@ -129,7 +129,11 @@ static DWORD GetNumberOfProcessors()
|
||||
size_t length = sizeof(numCPUs);
|
||||
|
||||
mib[0] = CTL_HW;
|
||||
mib[1] = HW_AVAILCPU;
|
||||
#if defined(__FreeBSD__)
|
||||
mib[1] = HW_NCPU;
|
||||
#else
|
||||
mid[1] = HW_AVAILCPU;
|
||||
#endif
|
||||
|
||||
sysctl(mib, 2, &numCPUs, &length, NULL, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user