Merge pull request #394 from dmarion/upstream
Remove dependency on linux dvb headers, compilation fixes
This commit is contained in:
commit
d177c5d885
3 changed files with 11 additions and 16 deletions
|
@ -1332,7 +1332,7 @@ satip_frontend_create
|
|||
override = htsmsg_get_str(conf, id);
|
||||
if (override) {
|
||||
i = dvb_str2type(override);
|
||||
if ((i == DVB_TYPE_T || i == DVB_TYPE_C || DVB_TYPE_S) && i != type)
|
||||
if ((i == DVB_TYPE_T || i == DVB_TYPE_C || i == DVB_TYPE_S) && i != type)
|
||||
type = i;
|
||||
else
|
||||
override = NULL;
|
||||
|
|
23
src/udp.c
23
src/udp.c
|
@ -95,21 +95,16 @@ udp_resolve( udp_connection_t *uc, int receiver )
|
|||
}
|
||||
|
||||
static int
|
||||
udp_get_ifindex( int fd, const char *ifname )
|
||||
udp_get_ifindex( const char *ifname )
|
||||
{
|
||||
struct ifreq ifr;
|
||||
unsigned int r;
|
||||
if (ifname == NULL || *ifname == '\0')
|
||||
return 0;
|
||||
memset(&ifr, 0, sizeof(ifr));
|
||||
strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
|
||||
ifr.ifr_name[IFNAMSIZ - 1] = '\0';
|
||||
if (ioctl(fd, SIOCGIFINDEX, &ifr))
|
||||
|
||||
r = if_nametoindex(ifname);
|
||||
if (!r)
|
||||
return -1;
|
||||
#if defined(PLATFORM_LINUX)
|
||||
return ifr.ifr_ifindex;
|
||||
#elif defined(PLATFORM_FREEBSD)
|
||||
return ifr.ifr_index;
|
||||
#endif
|
||||
return r;
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -120,7 +115,7 @@ udp_get_solip( void )
|
|||
#else
|
||||
struct protoent *pent;
|
||||
pent = getprotobyname("ip");
|
||||
return = (pent != NULL) ? pent->p_proto : 0;
|
||||
return (pent != NULL) ? pent->p_proto : 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -160,7 +155,7 @@ udp_bind ( const char *subsystem, const char *name,
|
|||
setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuse, sizeof(reuse));
|
||||
|
||||
/* Bind to interface */
|
||||
ifindex = uc->multicast ? udp_get_ifindex(fd, ifname) : 0;
|
||||
ifindex = uc->multicast ? udp_get_ifindex(ifname) : 0;
|
||||
if (ifindex < 0) {
|
||||
tvherror(subsystem, "%s - could not find interface %s",
|
||||
name, ifname);
|
||||
|
@ -308,7 +303,7 @@ udp_connect ( const char *subsystem, const char *name,
|
|||
}
|
||||
|
||||
/* Bind to interface */
|
||||
ifindex = uc->multicast ? udp_get_ifindex(fd, ifname) : 0;
|
||||
ifindex = uc->multicast ? udp_get_ifindex(ifname) : 0;
|
||||
if (ifindex < 0) {
|
||||
tvherror(subsystem, "%s - could not find interface %s",
|
||||
name, ifname);
|
||||
|
|
|
@ -150,7 +150,7 @@ extjs_root(http_connection_t *hc, const char *remain, void *opaque)
|
|||
extjs_load(hq, "static/app/tvadapters.js");
|
||||
extjs_load(hq, "static/app/idnode.js");
|
||||
extjs_load(hq, "static/app/esfilter.js");
|
||||
#if ENABLE_LINUXDVB
|
||||
#if ENABLE_MPEGTS
|
||||
extjs_load(hq, "static/app/mpegts.js");
|
||||
#endif
|
||||
extjs_load(hq, "static/app/iptv.js");
|
||||
|
|
Loading…
Add table
Reference in a new issue