Skip to content

Commit d3086c6

Browse files
committed
fix sqlite3_opt_unlock_notify compilation with libsqlite3 build tag
1 parent aa6383f commit d3086c6

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/go.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
env:
2525
OS: ${{ matrix.os }}
2626
GO: ${{ matrix.go }}
27+
ALL_TAGS: 'sqlite_allow_uri_authority,sqlite_app_armor,sqlite_column_metadata,sqlite_foreign_keys,sqlite_fts5,sqlite_icu,sqlite_introspect,sqlite_json,sqlite_math_functions,sqlite_os_trace,sqlite_preupdate_hook,sqlite_secure_delete,sqlite_see,sqlite_stat4,sqlite_trace,sqlite_unlock_notify,sqlite_vacuum_incr,sqlite_vtable'
2728
steps:
2829
- if: startsWith(matrix.os, 'macos')
2930
run: |
@@ -50,7 +51,10 @@ jobs:
5051
run: make test_userauth_fails test_userauth_fails_libsqlite3
5152

5253
- name: 'Tags: full'
53-
run: go test -race -v -tags "sqlite_allow_uri_authority sqlite_app_armor sqlite_column_metadata sqlite_foreign_keys sqlite_fts5 sqlite_icu sqlite_introspect sqlite_json sqlite_math_functions sqlite_os_trace sqlite_preupdate_hook sqlite_secure_delete sqlite_see sqlite_stat4 sqlite_trace sqlite_unlock_notify sqlite_vacuum_incr sqlite_vtable"
54+
run: go test -race -v -tags="${ALL_TAGS}"
55+
56+
- name: 'Tags: full libsqlite3'
57+
run: go test -race -v -tags="${ALL_TAGS},libsqlite3"
5458

5559
- name: 'Tags: vacuum'
5660
run: go test -v -tags "sqlite_vacuum_full"

sqlite3_opt_unlock_notify.go

Lines changed: 4 additions & 0 deletions
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)