File tree 1 file changed +12
-1
lines changed
1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ package sqlite3
21
21
#cgo CFLAGS: -DSQLITE_DEFAULT_WAL_SYNCHRONOUS=1
22
22
#cgo CFLAGS: -DSQLITE_ENABLE_UPDATE_DELETE_LIMIT
23
23
#cgo CFLAGS: -Wno-deprecated-declarations
24
- #cgo linux,!android CFLAGS: -DHAVE_PREAD64=1 -DHAVE_PWRITE64=1
25
24
#cgo openbsd CFLAGS: -I/usr/local/include
26
25
#cgo openbsd LDFLAGS: -L/usr/local/lib
27
26
#ifndef USE_LIBSQLITE3
@@ -48,6 +47,18 @@ package sqlite3
48
47
# define SQLITE_DETERMINISTIC 0
49
48
#endif
50
49
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
+
51
62
static int
52
63
_sqlite3_open_v2(const char *filename, sqlite3 **ppDb, int flags, const char *zVfs) {
53
64
#ifdef SQLITE_OPEN_URI
You can’t perform that action at this time.
0 commit comments