From 3d6c6f934500002267363041852b31a7a4e32159 Mon Sep 17 00:00:00 2001 From: Stéphane Graber Date: Wed, 11 Mar 2015 15:18:10 -0400 Subject: Rename sqlite3.{c,h} to sqlite3-binding.{c,h} MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes the problem where when building with gccgo, sqlite3.c is overwritten, leading to a build failure. An alternative would have been to move sqlite3*.{c,h} to a subdirectory, but that seems to confuse the linker a fair bit and would just swap one implementation-dependent issue for another. Closes #20 Signed-off-by: Stéphane Graber --- sqlite3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sqlite3.go') diff --git a/sqlite3.go b/sqlite3.go index 5f94a96..4cdc4d5 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -9,7 +9,7 @@ package sqlite3 #cgo CFLAGS: -std=gnu99 #cgo CFLAGS: -DSQLITE_ENABLE_RTREE -DSQLITE_THREADSAFE #cgo CFLAGS: -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -#include +#include #include #include -- cgit v1.2.3 From e688f0a8eb3db91c7cd1bf0925bac5bdf951a553 Mon Sep 17 00:00:00 2001 From: Stéphane Graber Date: Wed, 11 Mar 2015 15:20:07 -0400 Subject: Link against pthread MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is required by gccgo because of the pthread_mutex_trylock symbol. Signed-off-by: Stéphane Graber --- sqlite3.go | 1 + 1 file changed, 1 insertion(+) (limited to 'sqlite3.go') diff --git a/sqlite3.go b/sqlite3.go index 4cdc4d5..edf3663 100644 --- a/sqlite3.go +++ b/sqlite3.go @@ -9,6 +9,7 @@ package sqlite3 #cgo CFLAGS: -std=gnu99 #cgo CFLAGS: -DSQLITE_ENABLE_RTREE -DSQLITE_THREADSAFE #cgo CFLAGS: -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS +#cgo LDFLAGS: -lpthread #include #include #include -- cgit v1.2.3