Merge branch 'osx' of git://github.com/dmarion/tvheadend into master
This commit is contained in:
commit
1c5de3a6f7
16 changed files with 110 additions and 30 deletions
11
Makefile
11
Makefile
|
@ -32,7 +32,16 @@ CFLAGS += -Wmissing-prototypes -fms-extensions
|
||||||
CFLAGS += -g -funsigned-char -O2
|
CFLAGS += -g -funsigned-char -O2
|
||||||
CFLAGS += -D_FILE_OFFSET_BITS=64
|
CFLAGS += -D_FILE_OFFSET_BITS=64
|
||||||
CFLAGS += -I${BUILDDIR} -I${ROOTDIR}/src -I${ROOTDIR}
|
CFLAGS += -I${BUILDDIR} -I${ROOTDIR}/src -I${ROOTDIR}
|
||||||
LDFLAGS += -lrt -ldl -lpthread -lm
|
LDFLAGS += -ldl -lpthread -lm
|
||||||
|
ifneq ($(PLATFORM), darwin)
|
||||||
|
LDFLAGS += -lrt
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(COMPILER), clang)
|
||||||
|
CFLAGS += -Wno-microsoft -Qunused-arguments -Wno-unused-function
|
||||||
|
CFLAGS += -Wno-unused-value -Wno-tautological-constant-out-of-range-compare
|
||||||
|
CFLAGS += -Wno-parentheses-equality -Wno-incompatible-pointer-types
|
||||||
|
endif
|
||||||
|
|
||||||
vpath %.c $(ROOTDIR)
|
vpath %.c $(ROOTDIR)
|
||||||
vpath %.h $(ROOTDIR)
|
vpath %.h $(ROOTDIR)
|
||||||
|
|
19
configure
vendored
19
configure
vendored
|
@ -72,6 +72,16 @@ check_cc_header execinfo
|
||||||
check_cc_option mmx
|
check_cc_option mmx
|
||||||
check_cc_option sse2
|
check_cc_option sse2
|
||||||
|
|
||||||
|
if check_cc '
|
||||||
|
#if !defined(__clang__)
|
||||||
|
#error this is not clang
|
||||||
|
#endif
|
||||||
|
'; then
|
||||||
|
COMPILER=clang
|
||||||
|
else
|
||||||
|
COMPILER=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
check_cc_snippet getloadavg '#include <stdlib.h>
|
check_cc_snippet getloadavg '#include <stdlib.h>
|
||||||
void test() { getloadavg(NULL,0); }'
|
void test() { getloadavg(NULL,0); }'
|
||||||
|
|
||||||
|
@ -147,6 +157,13 @@ else
|
||||||
die "SSL development support not found"
|
die "SSL development support not found"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#
|
||||||
|
# OS X
|
||||||
|
#
|
||||||
|
if [ ${PLATFORM} = "darwin" ]; then
|
||||||
|
disable linuxdvb
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# DVB API
|
# DVB API
|
||||||
#
|
#
|
||||||
|
@ -296,7 +313,7 @@ fi
|
||||||
#
|
#
|
||||||
# kqueue
|
# kqueue
|
||||||
#
|
#
|
||||||
if [ ${PLATFORM} = "freebsd" ]; then
|
if [ ${PLATFORM} = "freebsd" ] || [ ${PLATFORM} = "darwin" ]; then
|
||||||
enable kqueue
|
enable kqueue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ static void
|
||||||
config_migrate_v1_dvb_svcs
|
config_migrate_v1_dvb_svcs
|
||||||
( const char *name, const char *netu, const char *muxu, htsmsg_t *channels )
|
( const char *name, const char *netu, const char *muxu, htsmsg_t *channels )
|
||||||
{
|
{
|
||||||
uuid_t svcu;
|
tvh_uuid_t svcu;
|
||||||
htsmsg_t *c, *e, *svc;
|
htsmsg_t *c, *e, *svc;
|
||||||
htsmsg_field_t *f;
|
htsmsg_field_t *f;
|
||||||
const char *str;
|
const char *str;
|
||||||
|
@ -139,7 +139,7 @@ config_migrate_v1_dvb_network
|
||||||
( const char *name, htsmsg_t *c, htsmsg_t *channels )
|
( const char *name, htsmsg_t *c, htsmsg_t *channels )
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
uuid_t netu, muxu;
|
tvh_uuid_t netu, muxu;
|
||||||
htsmsg_t *e, *net, *mux, *tun;
|
htsmsg_t *e, *net, *mux, *tun;
|
||||||
htsmsg_field_t *f;
|
htsmsg_field_t *f;
|
||||||
const char *str, *type;
|
const char *str, *type;
|
||||||
|
@ -321,7 +321,7 @@ config_migrate_v1_epggrab ( const char *path, htsmsg_t *channels )
|
||||||
static void
|
static void
|
||||||
config_migrate_v1 ( void )
|
config_migrate_v1 ( void )
|
||||||
{
|
{
|
||||||
uuid_t netu, muxu, svcu, chnu;
|
tvh_uuid_t netu, muxu, svcu, chnu;
|
||||||
htsmsg_t *c, *m, *e, *l;
|
htsmsg_t *c, *m, *e, *l;
|
||||||
htsmsg_field_t *f;
|
htsmsg_field_t *f;
|
||||||
uint32_t u32;
|
uint32_t u32;
|
||||||
|
@ -450,7 +450,7 @@ static void
|
||||||
config_migrate_v2 ( void )
|
config_migrate_v2 ( void )
|
||||||
{
|
{
|
||||||
htsmsg_t *m;
|
htsmsg_t *m;
|
||||||
uuid_t u;
|
tvh_uuid_t u;
|
||||||
char src[1024], dst[1024];
|
char src[1024], dst[1024];
|
||||||
|
|
||||||
/* Do we have IPTV config to migrate ? */
|
/* Do we have IPTV config to migrate ? */
|
||||||
|
|
|
@ -766,9 +766,9 @@ http_client_data_received( http_client_t *hc, char *buf, ssize_t len, int hdr )
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
csize = hc->hc_csize < 0 ? 0 : hc->hc_csize;
|
csize = hc->hc_csize == (size_t) -1 ? 0 : hc->hc_csize;
|
||||||
l = len;
|
l = len;
|
||||||
if (hc->hc_csize && hc->hc_csize != -1 && hc->hc_rpos > csize) {
|
if (hc->hc_csize && hc->hc_csize != (size_t) -1 && hc->hc_rpos > csize) {
|
||||||
l2 = hc->hc_rpos - csize;
|
l2 = hc->hc_rpos - csize;
|
||||||
if (l2 < l)
|
if (l2 < l)
|
||||||
l = l2;
|
l = l2;
|
||||||
|
@ -801,7 +801,7 @@ int
|
||||||
http_client_run( http_client_t *hc )
|
http_client_run( http_client_t *hc )
|
||||||
{
|
{
|
||||||
char *buf, *saveptr, *argv[3], *d, *p;
|
char *buf, *saveptr, *argv[3], *d, *p;
|
||||||
http_ver_t ver;
|
int ver;
|
||||||
ssize_t r;
|
ssize_t r;
|
||||||
size_t len;
|
size_t len;
|
||||||
int res;
|
int res;
|
||||||
|
|
|
@ -102,7 +102,7 @@ idnode_insert(idnode_t *in, const char *uuid, const idclass_t *class)
|
||||||
{
|
{
|
||||||
idnode_t *c;
|
idnode_t *c;
|
||||||
lock_assert(&global_lock);
|
lock_assert(&global_lock);
|
||||||
uuid_t u;
|
tvh_uuid_t u;
|
||||||
if (uuid_init_bin(&u, uuid))
|
if (uuid_init_bin(&u, uuid))
|
||||||
return -1;
|
return -1;
|
||||||
memcpy(in->in_uuid, u.bin, sizeof(in->in_uuid));
|
memcpy(in->in_uuid, u.bin, sizeof(in->in_uuid));
|
||||||
|
@ -192,7 +192,7 @@ idnode_get_short_uuid (const idnode_t *in)
|
||||||
const char *
|
const char *
|
||||||
idnode_uuid_as_str(const idnode_t *in)
|
idnode_uuid_as_str(const idnode_t *in)
|
||||||
{
|
{
|
||||||
static uuid_t ret[16];
|
static tvh_uuid_t ret[16];
|
||||||
static uint8_t p = 0;
|
static uint8_t p = 0;
|
||||||
bin2hex(ret[p].hex, sizeof(ret[p].hex), in->in_uuid, sizeof(in->in_uuid));
|
bin2hex(ret[p].hex, sizeof(ret[p].hex), in->in_uuid, sizeof(in->in_uuid));
|
||||||
const char *s = ret[p].hex;
|
const char *s = ret[p].hex;
|
||||||
|
|
|
@ -187,7 +187,7 @@ linuxdvb_adapter_add ( const char *path )
|
||||||
extern int linuxdvb_adapter_mask;
|
extern int linuxdvb_adapter_mask;
|
||||||
int a, i, j, r, fd;
|
int a, i, j, r, fd;
|
||||||
char fe_path[512], dmx_path[512], dvr_path[512];
|
char fe_path[512], dmx_path[512], dvr_path[512];
|
||||||
uuid_t uuid;
|
tvh_uuid_t uuid;
|
||||||
linuxdvb_adapter_t *la = NULL;
|
linuxdvb_adapter_t *la = NULL;
|
||||||
struct dvb_frontend_info dfi;
|
struct dvb_frontend_info dfi;
|
||||||
SHA_CTX sha1;
|
SHA_CTX sha1;
|
||||||
|
|
|
@ -256,7 +256,7 @@ satip_device_calc_bin_uuid( uint8_t *uuid, const char *satip_uuid )
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
satip_device_calc_uuid( uuid_t *uuid, const char *satip_uuid )
|
satip_device_calc_uuid( tvh_uuid_t *uuid, const char *satip_uuid )
|
||||||
{
|
{
|
||||||
uint8_t uuidbin[20];
|
uint8_t uuidbin[20];
|
||||||
|
|
||||||
|
@ -287,7 +287,7 @@ static satip_device_t *
|
||||||
satip_device_create( satip_device_info_t *info )
|
satip_device_create( satip_device_info_t *info )
|
||||||
{
|
{
|
||||||
satip_device_t *sd = calloc(1, sizeof(satip_device_t));
|
satip_device_t *sd = calloc(1, sizeof(satip_device_t));
|
||||||
uuid_t uuid;
|
tvh_uuid_t uuid;
|
||||||
htsmsg_t *conf = NULL, *feconf = NULL;
|
htsmsg_t *conf = NULL, *feconf = NULL;
|
||||||
char *argv[10];
|
char *argv[10];
|
||||||
int i, j, n, m, fenum, t2, save = 0;
|
int i, j, n, m, fenum, t2, save = 0;
|
||||||
|
|
|
@ -28,6 +28,10 @@
|
||||||
#include "muxer/muxer_libav.h"
|
#include "muxer/muxer_libav.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PLATFORM_DARWIN)
|
||||||
|
#define fdatasync(fd) fcntl(fd, F_FULLFSYNC)
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mime type for containers containing only audio
|
* Mime type for containers containing only audio
|
||||||
*/
|
*/
|
||||||
|
@ -458,7 +462,11 @@ muxer_cache_update(muxer_t *m, int fd, off_t pos, size_t size)
|
||||||
fdatasync(fd);
|
fdatasync(fd);
|
||||||
/* fall through */
|
/* fall through */
|
||||||
case MC_CACHE_DONTKEEP:
|
case MC_CACHE_DONTKEEP:
|
||||||
|
#if defined(PLATFORM_DARWIN)
|
||||||
|
fcntl(fd, F_NOCACHE, 1);
|
||||||
|
#else
|
||||||
posix_fadvise(fd, pos, size, POSIX_FADV_DONTNEED);
|
posix_fadvise(fd, pos, size, POSIX_FADV_DONTNEED);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
abort();
|
abort();
|
||||||
|
|
22
src/trap.c
22
src/trap.c
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
char tvh_binshasum[20];
|
char tvh_binshasum[20];
|
||||||
|
|
||||||
#if defined(__i386__) || defined(__x86_64__)
|
#if (defined(__i386__) || defined(__x86_64__)) && !defined(PLATFORM_DARWIN)
|
||||||
|
|
||||||
// Only do this on x86 for now
|
// Only do this on x86 for now
|
||||||
|
|
||||||
|
@ -315,6 +315,26 @@ trap_init(const char *ver)
|
||||||
sigprocmask(SIG_UNBLOCK, &m, NULL);
|
sigprocmask(SIG_UNBLOCK, &m, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#elif defined(PLATFORM_DARWIN)
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
|
void
|
||||||
|
trap_init(const char *ver)
|
||||||
|
{
|
||||||
|
sigset_t m;
|
||||||
|
|
||||||
|
sigemptyset(&m);
|
||||||
|
sigaddset(&m, SIGSEGV);
|
||||||
|
sigaddset(&m, SIGBUS);
|
||||||
|
sigaddset(&m, SIGILL);
|
||||||
|
sigaddset(&m, SIGABRT);
|
||||||
|
sigaddset(&m, SIGFPE);
|
||||||
|
|
||||||
|
sigprocmask(SIG_UNBLOCK, &m, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -500,6 +500,20 @@ int tvh_str_update(char **strp, const char *src);
|
||||||
#define CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC
|
#define CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef PLATFORM_DARWIN
|
||||||
|
#define CLOCK_MONOTONIC 0
|
||||||
|
#define CLOCK_REALTIME 0
|
||||||
|
|
||||||
|
static inline int clock_gettime(int clk_id, struct timespec* t) {
|
||||||
|
struct timeval now;
|
||||||
|
int rv = gettimeofday(&now, NULL);
|
||||||
|
if (rv) return rv;
|
||||||
|
t->tv_sec = now.tv_sec;
|
||||||
|
t->tv_nsec = now.tv_usec * 1000;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static inline int64_t
|
static inline int64_t
|
||||||
getmonoclock(void)
|
getmonoclock(void)
|
||||||
{
|
{
|
||||||
|
@ -677,8 +691,13 @@ void tvh_qsort_r(void *base, size_t nmemb, size_t size, int (*compar)(const void
|
||||||
#endif
|
#endif
|
||||||
#define PRIslongword_t "ld"
|
#define PRIslongword_t "ld"
|
||||||
#define PRIulongword_t "lu"
|
#define PRIulongword_t "lu"
|
||||||
|
#if defined(PLATFORM_DARWIN)
|
||||||
|
#define PRIsize_t PRIulongword_t
|
||||||
|
#define PRIssize_t PRIslongword_t
|
||||||
|
#else
|
||||||
#define PRIsize_t PRIuword_t
|
#define PRIsize_t PRIuword_t
|
||||||
#define PRIssize_t PRIsword_t
|
#define PRIssize_t PRIsword_t
|
||||||
|
#endif
|
||||||
#if __WORDSIZE == 32 && defined(PLATFORM_FREEBSD)
|
#if __WORDSIZE == 32 && defined(PLATFORM_FREEBSD)
|
||||||
#define PRItime_t PRIsword_t
|
#define PRItime_t PRIsword_t
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -147,7 +147,7 @@ upnp_thread( void *aux )
|
||||||
inet_ntop(ip.ss_family, IP_IN_ADDR(ip), tbuf, sizeof(tbuf));
|
inet_ntop(ip.ss_family, IP_IN_ADDR(ip), tbuf, sizeof(tbuf));
|
||||||
tvhtrace("upnp", "%s - received data from %s:%hu [size=%zi]",
|
tvhtrace("upnp", "%s - received data from %s:%hu [size=%zi]",
|
||||||
conn == multicast ? "multicast" : "unicast",
|
conn == multicast ? "multicast" : "unicast",
|
||||||
tbuf, IP_PORT(ip), size);
|
tbuf, (unsigned short) IP_PORT(ip), size);
|
||||||
tvhlog_hexdump("upnp", buf, size);
|
tvhlog_hexdump("upnp", buf, size);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
16
src/uuid.c
16
src/uuid.c
|
@ -103,9 +103,9 @@ uuid_init ( void )
|
||||||
|
|
||||||
/* Initialise binary */
|
/* Initialise binary */
|
||||||
int
|
int
|
||||||
uuid_init_bin ( uuid_t *u, const char *str )
|
uuid_init_bin ( tvh_uuid_t *u, const char *str )
|
||||||
{
|
{
|
||||||
memset(u, 0, sizeof(uuid_t));
|
memset(u, 0, sizeof(tvh_uuid_t));
|
||||||
if (str) {
|
if (str) {
|
||||||
return hex2bin(u->bin, sizeof(u->bin), str);
|
return hex2bin(u->bin, sizeof(u->bin), str);
|
||||||
} else if (read(fd, u->bin, sizeof(u->bin)) != sizeof(u->bin)) {
|
} else if (read(fd, u->bin, sizeof(u->bin)) != sizeof(u->bin)) {
|
||||||
|
@ -117,9 +117,9 @@ uuid_init_bin ( uuid_t *u, const char *str )
|
||||||
|
|
||||||
/* Initialise hex string */
|
/* Initialise hex string */
|
||||||
int
|
int
|
||||||
uuid_init_hex ( uuid_t *u, const char *str )
|
uuid_init_hex ( tvh_uuid_t *u, const char *str )
|
||||||
{
|
{
|
||||||
uuid_t tmp;
|
tvh_uuid_t tmp;
|
||||||
if (uuid_init_bin(&tmp, str))
|
if (uuid_init_bin(&tmp, str))
|
||||||
return 1;
|
return 1;
|
||||||
return uuid_bin2hex(&tmp, u);
|
return uuid_bin2hex(&tmp, u);
|
||||||
|
@ -127,9 +127,9 @@ uuid_init_hex ( uuid_t *u, const char *str )
|
||||||
|
|
||||||
/* Convert bin to hex string */
|
/* Convert bin to hex string */
|
||||||
int
|
int
|
||||||
uuid_bin2hex ( const uuid_t *a, uuid_t *b )
|
uuid_bin2hex ( const tvh_uuid_t *a, tvh_uuid_t *b )
|
||||||
{
|
{
|
||||||
uuid_t tmp;
|
tvh_uuid_t tmp;
|
||||||
memset(&tmp, 0, sizeof(tmp));
|
memset(&tmp, 0, sizeof(tmp));
|
||||||
bin2hex(tmp.hex, sizeof(tmp.hex), a->bin, sizeof(a->bin));
|
bin2hex(tmp.hex, sizeof(tmp.hex), a->bin, sizeof(a->bin));
|
||||||
memcpy(b, &tmp, sizeof(tmp));
|
memcpy(b, &tmp, sizeof(tmp));
|
||||||
|
@ -138,9 +138,9 @@ uuid_bin2hex ( const uuid_t *a, uuid_t *b )
|
||||||
|
|
||||||
/* Convert hex string to bin (in place) */
|
/* Convert hex string to bin (in place) */
|
||||||
int
|
int
|
||||||
uuid_hex2bin ( const uuid_t *a, uuid_t *b )
|
uuid_hex2bin ( const tvh_uuid_t *a, tvh_uuid_t *b )
|
||||||
{
|
{
|
||||||
uuid_t tmp;
|
tvh_uuid_t tmp;
|
||||||
memset(&tmp, 0, sizeof(tmp));
|
memset(&tmp, 0, sizeof(tmp));
|
||||||
if (hex2bin(tmp.bin, sizeof(tmp.bin), a->hex))
|
if (hex2bin(tmp.bin, sizeof(tmp.bin), a->hex))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
10
src/uuid.h
10
src/uuid.h
|
@ -31,30 +31,30 @@ typedef struct uuid {
|
||||||
uint8_t bin[UUID_BIN_SIZE];
|
uint8_t bin[UUID_BIN_SIZE];
|
||||||
char hex[UUID_HEX_SIZE];
|
char hex[UUID_HEX_SIZE];
|
||||||
};
|
};
|
||||||
} uuid_t;
|
} tvh_uuid_t;
|
||||||
|
|
||||||
/* Initialise subsystem */
|
/* Initialise subsystem */
|
||||||
void uuid_init ( void );
|
void uuid_init ( void );
|
||||||
|
|
||||||
/* Initialise binary */
|
/* Initialise binary */
|
||||||
int uuid_init_bin ( uuid_t *u, const char *str );
|
int uuid_init_bin ( tvh_uuid_t *u, const char *str );
|
||||||
|
|
||||||
/* Initialise hex string */
|
/* Initialise hex string */
|
||||||
int uuid_init_hex ( uuid_t *u, const char *str );
|
int uuid_init_hex ( tvh_uuid_t *u, const char *str );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert bin to hex string
|
* Convert bin to hex string
|
||||||
*
|
*
|
||||||
* Note: conversion is done such that a and b can be the same
|
* Note: conversion is done such that a and b can be the same
|
||||||
*/
|
*/
|
||||||
int uuid_bin2hex ( const uuid_t *a, uuid_t *b );
|
int uuid_bin2hex ( const tvh_uuid_t *a, tvh_uuid_t *b );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert hex string to bin (in place)
|
* Convert hex string to bin (in place)
|
||||||
*
|
*
|
||||||
* Note: conversion is done such that a and b can be the same
|
* Note: conversion is done such that a and b can be the same
|
||||||
*/
|
*/
|
||||||
int uuid_hex2bin ( const uuid_t *a, uuid_t *b );
|
int uuid_hex2bin ( const tvh_uuid_t *a, tvh_uuid_t *b );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Hex string to binary
|
* Hex string to binary
|
||||||
|
|
|
@ -930,7 +930,7 @@ page_dvrfile(http_connection_t *hc, const char *remain, void *opaque)
|
||||||
off_t content_len, file_start, file_end, chunk;
|
off_t content_len, file_start, file_end, chunk;
|
||||||
#if defined(PLATFORM_LINUX)
|
#if defined(PLATFORM_LINUX)
|
||||||
ssize_t r;
|
ssize_t r;
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD) || defined(PLATFORM_DARWIN)
|
||||||
off_t r;
|
off_t r;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1017,6 +1017,9 @@ page_dvrfile(http_connection_t *hc, const char *remain, void *opaque)
|
||||||
r = sendfile(hc->hc_fd, fd, NULL, chunk);
|
r = sendfile(hc->hc_fd, fd, NULL, chunk);
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD)
|
||||||
sendfile(fd, hc->hc_fd, 0, chunk, NULL, &r, 0);
|
sendfile(fd, hc->hc_fd, 0, chunk, NULL, &r, 0);
|
||||||
|
#elif defined(PLATFORM_DARWIN)
|
||||||
|
r = chunk;
|
||||||
|
sendfile(fd, hc->hc_fd, 0, NULL, &r, 0);
|
||||||
#endif
|
#endif
|
||||||
if(r == -1) {
|
if(r == -1) {
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
|
@ -109,6 +109,8 @@ thread_wrapper ( void *p )
|
||||||
#elif defined(PLATFORM_FREEBSD)
|
#elif defined(PLATFORM_FREEBSD)
|
||||||
/* Set name of thread */
|
/* Set name of thread */
|
||||||
pthread_set_name_np(pthread_self(), ts->name);
|
pthread_set_name_np(pthread_self(), ts->name);
|
||||||
|
#elif defined(PLATFORM_DARWIN)
|
||||||
|
pthread_setname_np(ts->name);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
sigemptyset(&set);
|
sigemptyset(&set);
|
||||||
|
|
|
@ -470,9 +470,11 @@ function write_config
|
||||||
CONFIGURE_ARGS = ${CONFIGURE_ARGS}
|
CONFIGURE_ARGS = ${CONFIGURE_ARGS}
|
||||||
ROOTDIR ?= ${ROOTDIR}
|
ROOTDIR ?= ${ROOTDIR}
|
||||||
BUILDDIR ?= ${BUILDDIR}
|
BUILDDIR ?= ${BUILDDIR}
|
||||||
|
PLATFORM ?= ${PLATFORM}
|
||||||
OSENV ?= ${OSENV}
|
OSENV ?= ${OSENV}
|
||||||
ARCH ?= ${ARCH}
|
ARCH ?= ${ARCH}
|
||||||
CPU ?= ${CPU}
|
CPU ?= ${CPU}
|
||||||
|
COMPILER ?= ${COMPILER}
|
||||||
ifeq (\$(origin CC),default)
|
ifeq (\$(origin CC),default)
|
||||||
CC = ${CC}
|
CC = ${CC}
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue