I just encountered a problem trying to build the sqlite amalgamation
package for android with the latest NDK (v15.2.4203891) on windows 10.
The compiler couldn't find mmap, which was causing a ton of errors.
I solved it by sticking this at the top-ish of sqlite3.c
sqlite-users mailing list