sqlite: fix build without threads
authorFabrice Fontaine <fontaine.fabrice@gmail.com>
Sun, 30 Sep 2018 19:35:14 +0000 (21:35 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sun, 30 Sep 2018 21:49:23 +0000 (23:49 +0200)
If threads are not available, set SQLITE_THREADSAFE to 0.
Indeed, since version 3.25.0, the following line:
THREADSAFE_FLAGS=-DSQLITE_THREADSAFE=0
has been removed from configure.ac
As a result, SQLITE_THREADSAFE will be set to a default value of 1 even
if --disable-threadsafe is set

Fixes:
 - http://autobuild.buildroot.org/results/70b1582edcb787746e4483e80b27f86ac781f0fa

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/sqlite/sqlite.mk

index cb4bd58c479800c43bfd9a1e48a89c192d3c669f..34a0b9538ef7e7dae430077ec1a4949a947d3f64 100644 (file)
@@ -54,6 +54,7 @@ ifeq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
 SQLITE_CONF_OPTS += --enable-threadsafe
 else
 SQLITE_CONF_OPTS += --disable-threadsafe
+SQLITE_CFLAGS += -DSQLITE_THREADSAFE=0
 endif
 
 ifeq ($(BR2_PACKAGE_NCURSES)$(BR2_PACKAGE_READLINE),yy)