Skip to content

Commit

Permalink
Fix musl build (mattn#1164)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgiannuzzi committed Jan 22, 2024
1 parent d6feb2b commit fb824c8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion sqlite3.go
Expand Up @@ -22,7 +22,6 @@ package sqlite3
#cgo CFLAGS: -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
#cgo CFLAGS: -Wno-deprecated-declarations
#cgo darwin LDFLAGS: -framework Security
#cgo linux,!android CFLAGS: -DHAVE_PREAD64=1 -DHAVE_PWRITE64=1
#cgo openbsd CFLAGS: -I/usr/local/include
#cgo openbsd LDFLAGS: -L/usr/local/lib
#cgo amd64 CFLAGS: -maes -msse4.1
Expand Down Expand Up @@ -50,6 +49,18 @@ package sqlite3
# define SQLITE_DETERMINISTIC 0
#endif
#if defined(HAVE_PREAD64) && defined(HAVE_PWRITE64)
# undef USE_PREAD
# undef USE_PWRITE
# define USE_PREAD64 1
# define USE_PWRITE64 1
#elif defined(HAVE_PREAD) && defined(HAVE_PWRITE)
# undef USE_PREAD
# undef USE_PWRITE
# define USE_PREAD64 1
# define USE_PWRITE64 1
#endif
static int
_sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs) {
#ifdef SQLITE_OPEN_URI
Expand Down

0 comments on commit fb824c8

Please sign in to comment.