It looks like it is related to WAL file processing and your -DSQLITE_OMIT_WAL disables the creation of the function but not the call to it in unixFileControl().
It looks like it is related to WAL file processing and your -DSQLITE_OMIT_WAL disables the creation of the function but not the call to it in unixFileControl().