From 7658c06970ecf5588d8cd930ed1f2de7223f1010 Mon Sep 17 00:00:00 2001 From: nina Date: Mon, 9 Dec 2024 05:36:34 +0100 Subject: [PATCH] Fix sqlite3_opt_unlock_notify with USE_LIBSQLITE3 (#1262) A valid sqlite header must always be included (like in the other files) but sqlite3-binding.h explicitly guards against the system library case. --- sqlite3_opt_unlock_notify.c | 4 ++++ sqlite3_opt_unlock_notify.go | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sqlite3_opt_unlock_notify.c b/sqlite3_opt_unlock_notify.c index fc37b33..3a00f43 100644 --- a/sqlite3_opt_unlock_notify.c +++ b/sqlite3_opt_unlock_notify.c @@ -5,7 +5,11 @@ #ifdef SQLITE_ENABLE_UNLOCK_NOTIFY #include +#ifndef USE_LIBSQLITE3 #include "sqlite3-binding.h" +#else +#include +#endif extern int unlock_notify_wait(sqlite3 *db); diff --git a/sqlite3_opt_unlock_notify.go b/sqlite3_opt_unlock_notify.go index 76f7bbf..3ac8050 100644 --- a/sqlite3_opt_unlock_notify.go +++ b/sqlite3_opt_unlock_notify.go @@ -12,7 +12,11 @@ package sqlite3 #cgo CFLAGS: -DSQLITE_ENABLE_UNLOCK_NOTIFY #include +#ifndef USE_LIBSQLITE3 #include "sqlite3-binding.h" +#else +#include +#endif extern void unlock_notify_callback(void *arg, int argc); */