diff --git a/configure b/configure index a5b760fed71a180c7a92e160275d6e84bdaa2e0a..b0e1339bf67a6fabfd7c0182dbc2dd9e88c13c36 100755 --- a/configure +++ b/configure @@ -3379,6 +3379,51 @@ _ACEOF fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqlite3_hard_heap_limit64 in -lsqlite3" >&5 +$as_echo_n "checking for sqlite3_hard_heap_limit64 in -lsqlite3... " >&6; } +if ${ac_cv_lib_sqlite3_sqlite3_hard_heap_limit64+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsqlite3 $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sqlite3_hard_heap_limit64 (); +int +main () +{ +return sqlite3_hard_heap_limit64 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_sqlite3_sqlite3_hard_heap_limit64=yes +else + ac_cv_lib_sqlite3_sqlite3_hard_heap_limit64=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sqlite3_sqlite3_hard_heap_limit64" >&5 +$as_echo "$ac_cv_lib_sqlite3_sqlite3_hard_heap_limit64" >&6; } +if test "x$ac_cv_lib_sqlite3_sqlite3_hard_heap_limit64" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSQLITE3 1 +_ACEOF + + LIBS="-lsqlite3 $LIBS" + +fi + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' diff --git a/configure.ac b/configure.ac index 4a5f7dfe39671a375f257cea161342f131ae6347..72eb44f74df91ad0f6622c0b69e95c79d270f455 100644 --- a/configure.ac +++ b/configure.ac @@ -20,6 +20,7 @@ AS_IF([test "$LKT_PATH_SOURCE" = "$LKT_PATH_BUILD"], [AC_MSG_ERROR([The build directory can't be the same as the source directory])]) AC_CHECK_LIB([sqlite3], [sqlite3_open_v2]) +AC_CHECK_LIB([sqlite3], [sqlite3_hard_heap_limit64]) AC_CHECK_HEADERS_ONCE([ sqlite3.h curl/curl.h diff --git a/scripts/validate.bash b/scripts/validate.bash index ebc421520e66dcff059bf5e44396956c58d13876..188e70cb02ec429612e5914d91b3d004a7b263bb 100755 --- a/scripts/validate.bash +++ b/scripts/validate.bash @@ -107,9 +107,7 @@ function do_prepare () function do_configure () { check_cd $LKT_BUILD - check_configure \ - --prefix=$LKT_DIR/install.$LKT_COMPILER \ - $LKT_CONFIGURE_OPTIONS + check_configure --prefix=$LKT_INSTALL $LKT_CONFIGURE_OPTIONS check_cd $LKT_DIR } diff --git a/src/base/commands.c b/src/base/commands.c index 34652615d8eff782d3576ca1a8ad3efd683b7f0b..6795fd4b29fa9198a4b5d9e230f37ab2c88d8746 100644 --- a/src/base/commands.c +++ b/src/base/commands.c @@ -455,7 +455,7 @@ static bool command_findid(struct lkt_state *srv, size_t c, char *id_str) { double duration; - struct kara_metadata kara = {0}; + struct kara_metadata kara = {}; char filepath[PATH_MAX] = {0}; long id = strtol(id_str, NULL, 0); /* XXX: Must be valid here */ if (!database_kara_by_id(srv->db, id, &kara, filepath)) { diff --git a/src/database/open.c b/src/database/open.c index 38087d5da32e4f91b41b36db1294e522eb2033a8..b12fd3c8b53c3e00246ecafb5e2d294644e1a724 100644 --- a/src/database/open.c +++ b/src/database/open.c @@ -105,7 +105,9 @@ database_new(volatile sqlite3 **db) SQLITE_OPEN_FULLMUTEX; if (SQLITE_OK != sqlite3_enable_shared_cache(1) || sqlite3_soft_heap_limit64(HEAP_LIMIT_SOFT) < 0 || - sqlite3_hard_heap_limit64(HEAP_LIMIT_HARD) < 0 || + /* sqlite3_hard_heap_limit64(HEAP_LIMIT_HARD) < 0 || TODO: Find a way to call this + * function only if available + * on the system */ SQLITE_OK != sqlite3_open_v2(":memory:", (sqlite3 **) db, flags, NULL)) return false; SQLITE_EXEC(*db, (const char *) ___src_database_memory_sql, err_not_init); diff --git a/src/module/module_repo.c b/src/module/module_repo.c index 32632b5b53fb5a59b53893706d89875fcf15b017..7fedced80272d1591e6e8b3b8921cabdcafafdda 100644 --- a/src/module/module_repo.c +++ b/src/module/module_repo.c @@ -255,6 +255,11 @@ module_repo_new(struct module_repo_internal *repo_, struct queue *queue, volatil return 0; } +static void +module_repo_update(struct module_repo_internal __attribute__((unused)) *self) +{ +} + /******************** * Export functions * ********************/