File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ package sqlite3
2121#cgo CFLAGS: -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1
2222#cgo CFLAGS: -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
2323#cgo CFLAGS: -Wno-deprecated-declarations
24- #cgo linux,!android CFLAGS: -DHAVE_PREAD64=1 -DHAVE_PWRITE64=1
2524#cgo openbsd CFLAGS: -I/usr/local/include
2625#cgo openbsd LDFLAGS: -L/usr/local/lib
2726#ifndef USE_LIBSQLITE3
@@ -48,6 +47,18 @@ package sqlite3
4847# define SQLITE_DETERMINISTIC 0
4948#endif
5049
50+ #if defined(HAVE_PREAD64) && defined(HAVE_PWRITE64)
51+ # undef USE_PREAD
52+ # undef USE_PWRITE
53+ # define USE_PREAD64 1
54+ # define USE_PWRITE64 1
55+ #elif defined(HAVE_PREAD) && defined(HAVE_PWRITE)
56+ # undef USE_PREAD
57+ # undef USE_PWRITE
58+ # define USE_PREAD64 1
59+ # define USE_PWRITE64 1
60+ #endif
61+
5162static int
5263_sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs) {
5364#ifdef SQLITE_OPEN_URI
You can’t perform that action at this time.
0 commit comments