Skip to content

Commit 7658c06

Browse files
authored
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.
1 parent c61eeb5 commit 7658c06

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

sqlite3_opt_unlock_notify.c

+4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55

66
#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
77
#include <stdio.h>
8+
#ifndef USE_LIBSQLITE3
89
#include "sqlite3-binding.h"
10+
#else
11+
#include <sqlite3.h>
12+
#endif
913

1014
extern int unlock_notify_wait(sqlite3 *db);
1115

sqlite3_opt_unlock_notify.go

+4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ package sqlite3
1212
#cgo CFLAGS: -DSQLITE_ENABLE_UNLOCK_NOTIFY
1313
1414
#include <stdlib.h>
15+
#ifndef USE_LIBSQLITE3
1516
#include "sqlite3-binding.h"
17+
#else
18+
#include <sqlite3.h>
19+
#endif
1620
1721
extern void unlock_notify_callback(void *arg, int argc);
1822
*/

0 commit comments

Comments
 (0)