lib / pq

Pure Go Postgres driver for database/sql
https://pkg.go.dev/github.com/lib/pq
MIT License
8.89k stars 906 forks source link

Fix build in android #1060

Closed ian4hu closed 2 years ago

ian4hu commented 2 years ago

Now build it on android with error:

# github.com/lib/pq
vendor/github.com/lib/pq/user_posix.go:13:6: userCurrent redeclared in this block
    /home/builder/.termux-build/algernon/build/src/github.com/xyproto/algernon/vendor/github.com/lib/pq/user_other.go:8:29: previous declaration

Because that GOOS=android implies GOOS=linux see https://pkg.go.dev/cmd/go#hdr-Build_constraints

Using GOOS=android matches build tags and files as for GOOS=linux in addition to android tags and files.

Fixes #1051

ian4hu commented 2 years ago

See #1051