File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -59,11 +59,19 @@ package sqlite
5959#cgo CFLAGS: -DSQLITE_OMIT_UTF16=1
6060
6161// PLATFORM FEATURES
62- #cgo CFLAGS: -DHAVE_FDATASYNC=1
63- #cgo CFLAGS: -DHAVE_PREAD=1 -DHAVE_PWRITE=1
64- #cgo CFLAGS: -DHAVE_USLEEP=1
65-
66- #cgo LDFLAGS: -lm
62+ #cgo linux LDFLAGS: -lm
63+ #cgo openbsd LDFLAGS: -lm
64+ #cgo linux,!android CFLAGS: -DHAVE_FDATASYNC=1
65+ #cgo linux,!android CFLAGS: -DHAVE_PREAD=1 -DHAVE_PWRITE=1
66+ #cgo darwin CFLAGS: -DHAVE_FDATASYNC=1
67+ #cgo darwin CFLAGS: -DHAVE_PREAD=1 -DHAVE_PWRITE=1
68+ #cgo windows LDFLAGS: -Wl,-Bstatic -lwinpthread -Wl,-Bdynamic
69+
70+ // Fix for BusyTimeout on *nix systems.
71+ #cgo !windows CFLAGS: -DHAVE_USLEEP=1
72+
73+ // Fix "_localtime32(0): not defined" linker error.
74+ #cgo windows,386 CFLAGS: -D_localtime32=localtime
6775
6876#include "sqlite3.h"
6977
You can’t perform that action at this time.
0 commit comments