* Also warn about old sqlite3 libraries during compile time.
This commit is contained in:
parent
c643cab907
commit
193c5305f9
18
minidlna.c
18
minidlna.c
@ -52,9 +52,10 @@
|
|||||||
#include "tivo_utils.h"
|
#include "tivo_utils.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* MAX_LAN_ADDR : maximum number of interfaces
|
#if SQLITE_VERSION_NUMBER < 3005001
|
||||||
* to listen to SSDP traffic */
|
# warning "Your SQLite3 library appears to be too old! Please use 3.5.1 or newer."
|
||||||
/*#define MAX_LAN_ADDR (4)*/
|
# define sqlite3_threadsafe() 0
|
||||||
|
#endif
|
||||||
|
|
||||||
static volatile int quitting = 0;
|
static volatile int quitting = 0;
|
||||||
|
|
||||||
@ -668,11 +669,12 @@ main(int argc, char * * argv)
|
|||||||
if( !sqlite3_threadsafe() )
|
if( !sqlite3_threadsafe() )
|
||||||
{
|
{
|
||||||
DPRINTF(E_ERROR, L_GENERAL, "SQLite library is not threadsafe! "
|
DPRINTF(E_ERROR, L_GENERAL, "SQLite library is not threadsafe! "
|
||||||
"Scanning must be finished before file serving can begin.\n");
|
"Scanning must be finished before file serving can begin, "
|
||||||
|
"and inotify will be disabled.\n");
|
||||||
}
|
}
|
||||||
if( sqlite3_libversion_number() < 3005009 )
|
if( sqlite3_libversion_number() < 3005001 )
|
||||||
{
|
{
|
||||||
DPRINTF(E_WARN, L_GENERAL, "SQLite library is old. Please use version 3.5.9 or newer.\n");
|
DPRINTF(E_WARN, L_GENERAL, "SQLite library is old. Please use version 3.5.1 or newer.\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
LIST_INIT(&upnphttphead);
|
LIST_INIT(&upnphttphead);
|
||||||
@ -723,7 +725,7 @@ main(int argc, char * * argv)
|
|||||||
}
|
}
|
||||||
scanning = 1;
|
scanning = 1;
|
||||||
#if USE_FORK
|
#if USE_FORK
|
||||||
if( sqlite3_threadsafe() && sqlite3_libversion_number() >= 3005000 )
|
if( sqlite3_threadsafe() && sqlite3_libversion_number() >= 3005001 )
|
||||||
{
|
{
|
||||||
if( pthread_create(&thread[0], NULL, start_scanner, NULL) )
|
if( pthread_create(&thread[0], NULL, start_scanner, NULL) )
|
||||||
{
|
{
|
||||||
@ -740,7 +742,7 @@ main(int argc, char * * argv)
|
|||||||
}
|
}
|
||||||
sqlite3_free_table(result);
|
sqlite3_free_table(result);
|
||||||
}
|
}
|
||||||
if( sqlite3_threadsafe() && sqlite3_libversion_number() >= 3005000 &&
|
if( sqlite3_threadsafe() && sqlite3_libversion_number() >= 3005001 &&
|
||||||
GETFLAG(INOTIFYMASK) && pthread_create(&thread[1], NULL, start_inotify, NULL) )
|
GETFLAG(INOTIFYMASK) && pthread_create(&thread[1], NULL, start_inotify, NULL) )
|
||||||
{
|
{
|
||||||
DPRINTF(E_FATAL, L_GENERAL, "ERROR: pthread_create() failed for start_inotify.\n");
|
DPRINTF(E_FATAL, L_GENERAL, "ERROR: pthread_create() failed for start_inotify.\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user