Merge pull request #438 from dreamcat4/freebsd

Fix FreeBSD compiler errors.
This commit is contained in:
perexg 2014-08-01 11:52:17 +02:00
commit d26ccbdbed
7 changed files with 28 additions and 0 deletions

View file

@ -17,13 +17,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "build.h"
#include "cron.h"
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if !defined(PLATFORM_FREEBSD)
#include <alloca.h>
#endif
/*
* Parse value

View file

@ -28,6 +28,11 @@
#include <fcntl.h>
#include <poll.h>
#if defined(PLATFORM_FREEBSD)
#include <sys/types.h>
#include <sys/socket.h>
#endif
#include <openssl/err.h>
#include <openssl/ssl.h>

View file

@ -28,6 +28,11 @@
#include <arpa/inet.h>
#include <openssl/sha.h>
#if defined(PLATFORM_FREEBSD)
#include <sys/types.h>
#include <sys/socket.h>
#endif
static void satip_device_discovery_start( void );
/*

View file

@ -24,6 +24,11 @@
#include "http.h"
#include "satip_private.h"
#if defined(PLATFORM_FREEBSD)
#include <sys/types.h>
#include <sys/socket.h>
#endif
static int
satip_frontend_tune1
( satip_frontend_t *lfe, mpegts_mux_instance_t *mmi );

View file

@ -459,6 +459,8 @@ scanfile_init ( void )
if (!path || !*path)
#if ENABLE_DVBSCAN
path = "data/dvb-scan";
#elif defined(PLATFORM_FREEBSD)
path = "/usr/local/share/dtv-scan-tables";
#else
path = "/usr/share/dvb";
#endif

View file

@ -30,6 +30,8 @@
#if defined(PLATFORM_DARWIN)
#define fdatasync(fd) fcntl(fd, F_FULLFSYNC)
#elif defined(PLATFORM_FREEBSD)
#define fdatasync(fd) fsync(fd)
#endif
/**

View file

@ -34,6 +34,11 @@
#include "tvhpoll.h"
#include "upnp.h"
#if defined(PLATFORM_FREEBSD)
#include <sys/types.h>
#include <sys/socket.h>
#endif
int upnp_running;
static pthread_t upnp_tid;
pthread_mutex_t upnp_lock;