* Fix some issues with uClibc.
This commit is contained in:
parent
f36047098c
commit
41f204029b
2
Makefile
2
Makefile
@ -35,7 +35,7 @@ BASEOBJS = minidlna.o upnphttp.o upnpdescgen.o upnpsoap.o \
|
|||||||
|
|
||||||
ALLOBJS = $(BASEOBJS) $(LNXOBJS)
|
ALLOBJS = $(BASEOBJS) $(LNXOBJS)
|
||||||
|
|
||||||
LIBS = -lexif -ljpeg -lsqlite3 -lavformat -lid3tag -lFLAC -lvorbis
|
LIBS = -lpthread -lexif -ljpeg -lsqlite3 -lavformat -lid3tag -lFLAC -lvorbis
|
||||||
#STATIC_LINKING: LIBS = -lvorbis -logg -lm -lsqlite3 -lpthread -lexif -ljpeg -lFLAC -lm -lid3tag -lz -lavformat -lavutil -lavcodec -lm
|
#STATIC_LINKING: LIBS = -lvorbis -logg -lm -lsqlite3 -lpthread -lexif -ljpeg -lFLAC -lm -lid3tag -lz -lavformat -lavutil -lavcodec -lm
|
||||||
|
|
||||||
TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
|
TESTUPNPDESCGENOBJS = testupnpdescgen.o upnpdescgen.o
|
||||||
|
@ -159,6 +159,15 @@ echo "/*#define HAVE_INOTIFY_H*/" >> ${CONFIGFILE}
|
|||||||
fi
|
fi
|
||||||
echo "" >> ${CONFIGFILE}
|
echo "" >> ${CONFIGFILE}
|
||||||
|
|
||||||
|
echo "/* Enable if the system iconv.h exists. ID3 tag reading in various character sets will not work properly otherwise. */" >> ${CONFIGFILE}
|
||||||
|
if [ -f /usr/include/iconv.h ]; then
|
||||||
|
echo "#define HAVE_ICONV_H" >> ${CONFIGFILE}
|
||||||
|
else
|
||||||
|
echo -e "\nWARNING!! Iconv support not found. ID3 tag reading may not work."
|
||||||
|
echo "/*#define HAVE_ICONV_H*/" >> ${CONFIGFILE}
|
||||||
|
fi
|
||||||
|
echo "" >> ${CONFIGFILE}
|
||||||
|
|
||||||
echo "/* Enable NETGEAR-specific tweaks. */" >> ${CONFIGFILE}
|
echo "/* Enable NETGEAR-specific tweaks. */" >> ${CONFIGFILE}
|
||||||
echo "${NETGEAR}" >> ${CONFIGFILE}
|
echo "${NETGEAR}" >> ${CONFIGFILE}
|
||||||
echo "/* Enable ReadyNAS-specific tweaks. */" >> ${CONFIGFILE}
|
echo "/* Enable ReadyNAS-specific tweaks. */" >> ${CONFIGFILE}
|
||||||
|
@ -109,7 +109,7 @@ getsyshwaddr(char * buf, int len)
|
|||||||
if(!ifaces)
|
if(!ifaces)
|
||||||
return(ret);
|
return(ret);
|
||||||
|
|
||||||
for(if_idx = ifaces+2; if_idx->if_index; if_idx++)
|
for(if_idx = ifaces; if_idx->if_index; if_idx++)
|
||||||
{
|
{
|
||||||
strncpy(ifr.ifr_name, if_idx->if_name, IFNAMSIZ);
|
strncpy(ifr.ifr_name, if_idx->if_name, IFNAMSIZ);
|
||||||
if(ioctl(fd, SIOCGIFFLAGS, &ifr) < 0)
|
if(ioctl(fd, SIOCGIFFLAGS, &ifr) < 0)
|
||||||
@ -118,6 +118,8 @@ getsyshwaddr(char * buf, int len)
|
|||||||
continue;
|
continue;
|
||||||
if( ioctl(fd, SIOCGIFHWADDR, &ifr) < 0 )
|
if( ioctl(fd, SIOCGIFHWADDR, &ifr) < 0 )
|
||||||
continue;
|
continue;
|
||||||
|
if( MACADDR_IS_ZERO(&ifr.ifr_hwaddr.sa_data) )
|
||||||
|
continue;
|
||||||
ret = 0;
|
ret = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -8,6 +8,14 @@
|
|||||||
#define __GETIFADDR_H__
|
#define __GETIFADDR_H__
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
|
|
||||||
|
#define MACADDR_IS_ZERO(x) \
|
||||||
|
((x[0] == 0x00) && \
|
||||||
|
(x[1] == 0x00) && \
|
||||||
|
(x[2] == 0x00) && \
|
||||||
|
(x[3] == 0x00) && \
|
||||||
|
(x[4] == 0x00) && \
|
||||||
|
(x[5] == 0x00))
|
||||||
|
|
||||||
/* getifaddr()
|
/* getifaddr()
|
||||||
* take a network interface name and write the
|
* take a network interface name and write the
|
||||||
* ip v4 address as text in the buffer
|
* ip v4 address as text in the buffer
|
||||||
|
@ -37,6 +37,7 @@ do_iconv(const char* to_ces, const char* from_ces,
|
|||||||
char *inbuf, size_t inbytesleft,
|
char *inbuf, size_t inbytesleft,
|
||||||
char *outbuf_orig, size_t outbytesleft_orig)
|
char *outbuf_orig, size_t outbytesleft_orig)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_ICONV_H
|
||||||
size_t rc;
|
size_t rc;
|
||||||
iconv_result ret = ICONV_OK;
|
iconv_result ret = ICONV_OK;
|
||||||
|
|
||||||
@ -65,6 +66,9 @@ do_iconv(const char* to_ces, const char* from_ces,
|
|||||||
iconv_close(cd);
|
iconv_close(cd);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
#else // HAVE_ICONV_H
|
||||||
|
return ICONV_FATAL;
|
||||||
|
#endif // HAVE_ICONV_H
|
||||||
}
|
}
|
||||||
|
|
||||||
#define N_LANG_ALT 8
|
#define N_LANG_ALT 8
|
||||||
|
@ -31,13 +31,15 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <iconv.h>
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
#include <ogg/ogg.h>
|
#include <ogg/ogg.h>
|
||||||
#include <vorbis/codec.h>
|
#include <vorbis/codec.h>
|
||||||
#include <FLAC/metadata.h>
|
#include <FLAC/metadata.h>
|
||||||
|
|
||||||
#include <netinet/in.h>
|
#ifdef HAVE_ICONV_H
|
||||||
|
#include <iconv.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sqlite3.h>
|
#include <sqlite3.h>
|
||||||
#include "tagutils.h"
|
#include "tagutils.h"
|
||||||
|
@ -301,6 +301,8 @@ set_filter_flags(char * filter)
|
|||||||
item = strtok_r(filter, ",", &saveptr);
|
item = strtok_r(filter, ",", &saveptr);
|
||||||
while( item != NULL )
|
while( item != NULL )
|
||||||
{
|
{
|
||||||
|
if( saveptr )
|
||||||
|
*(saveptr-1) = ',';
|
||||||
if( strcmp(item, "@childCount") == 0 )
|
if( strcmp(item, "@childCount") == 0 )
|
||||||
{
|
{
|
||||||
flags |= FILTER_CHILDCOUNT;
|
flags |= FILTER_CHILDCOUNT;
|
||||||
@ -400,8 +402,6 @@ set_filter_flags(char * filter)
|
|||||||
flags |= FILTER_RES;
|
flags |= FILTER_RES;
|
||||||
flags |= FILTER_RES_SIZE;
|
flags |= FILTER_RES_SIZE;
|
||||||
}
|
}
|
||||||
if( *saveptr )
|
|
||||||
*(saveptr-1) = ',';
|
|
||||||
item = strtok_r(NULL, ",", &saveptr);
|
item = strtok_r(NULL, ",", &saveptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
uuid.c
1
uuid.c
@ -16,7 +16,6 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <ifaddrs.h>
|
|
||||||
#include <net/if.h>
|
#include <net/if.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user