build: fix mutex detection when building bdb on macOS
build: fix mutex detection when building bdb on macOS

Starting with the Clang shipped with Xcode 12, Apple has enabled
-Werror=implicit-function-declaration by default. This causes bdbs mutex
detection to fail when building on macOS (not cross-compiling):

checking for mutexes... UNIX/fcntl
configure: WARNING: NO SHARED LATCH IMPLEMENTATION FOUND FOR THIS PLATFORM.
configure: error: Unable to find a mutex implementation

as previously emitted warnings are being turned into errors. i.e:

error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]

Append -Wno-error=implicit-function-declaration to cflags so that
-Wimplicit-function-declaration returns to being a warning, and the
configure checks will succeed.

Fixes #19411.

practicalswift/bitcoin,kallewoof/bitcoin,GroestlCoin/bitcoin,particl/particl-core,particl/particl-core,kallewoof/bitcoin,MeshCollider/bitcoin,JeremyRubin/bitcoin,ajtowns/bitcoin,sstone/bitcoin,bitcoin/bitcoin,EthanHeilman/bitcoin,anditto/bitcoin,MeshCollider/bitcoin,GroestlCoin/bitcoin,n1bor/bitcoin,bitcoinsSG/bitcoin,JeremyRubin/bitcoin,MarcoFalke/bitcoin,yenliangl/bitcoin,jlopp/statoshi,MarcoFalke/bitcoin,instagibbs/bitcoin,pstratem/bitcoin,bitcoin/bitcoin,lateminer/bitcoin,bitcoinsSG/bitcoin,EthanHeilman/bitcoin,n1bor/bitcoin,namecoin/namecore,particl/particl-core,mruddy/bitcoin,tecnovert/particl-core,fujicoin/fujicoin,mruddy/bitcoin,fanquake/bitcoin,pataquets/namecoin-core,achow101/bitcoin,AkioNak/bitcoin,ajtowns/bitcoin,jonasschnelli/bitcoin,lateminer/bitcoin,mm-s/bitcoin,rnicoll/dogecoin,domob1812/bitcoin,mm-s/bitcoin,apoelstra/bitcoin,MarcoFalke/bitcoin,dscotese/bitcoin,AkioNak/bitcoin,instagibbs/bitcoin,fanquake/bitcoin,jonasschnelli/bitcoin,bitcoin/bitcoin,pstratem/bitcoin,jamesob/bitcoin,practicalswift/bitcoin,EthanHeilman/bitcoin,yenliangl/bitcoin,rnicoll/bitcoin,instagibbs/bitcoin,jlopp/statoshi,ElementsProject/elements,GroestlCoin/bitcoin,litecoin-project/litecoin,lateminer/bitcoin,ajtowns/bitcoin,jonasschnelli/bitcoin,yenliangl/bitcoin,rnicoll/dogecoin,rnicoll/dogecoin,alecalve/bitcoin,jamesob/bitcoin,mm-s/bitcoin,namecoin/namecoin-core,bitcoinknots/bitcoin,domob1812/bitcoin,pstratem/bitcoin,qtumproject/qtum,pataquets/namecoin-core,cdecker/bitcoin,andreaskern/bitcoin,lateminer/bitcoin,kallewoof/bitcoin,pstratem/bitcoin,EthanHeilman/bitcoin,tecnovert/particl-core,domob1812/namecore,dscotese/bitcoin,sstone/bitcoin,sipsorcery/bitcoin,jlopp/statoshi,namecoin/namecoin-core,namecoin/namecore,jamesob/bitcoin,Sjors/bitcoin,pataquets/namecoin-core,namecoin/namecore,litecoin-project/litecoin,GroestlCoin/GroestlCoin,Xekyo/bitcoin,cdecker/bitcoin,jambolo/bitcoin,domob1812/bitcoin,Sjors/bitcoin,achow101/bitcoin,particl/particl-core,anditto/bitcoin,domob1812/bitcoin,sipsorcery/bitcoin,mm-s/bitcoin,pstratem/bitcoin,bitcoin/bitcoin,achow101/bitcoin,JeremyRubin/bitcoin,ElementsProject/elements,qtumproject/qtum,litecoin-project/litecoin,jnewbery/bitcoin,Xekyo/bitcoin,mm-s/bitcoin,namecoin/namecore,particl/particl-core,bitcoinknots/bitcoin,ElementsProject/elements,EthanHeilman/bitcoin,cdecker/bitcoin,AkioNak/bitcoin,GroestlCoin/GroestlCoin,alecalve/bitcoin,jonasschnelli/bitcoin,domob1812/namecore,rnicoll/dogecoin,sstone/bitcoin,GroestlCoin/GroestlCoin,pataquets/namecoin-core,jlopp/statoshi,tecnovert/particl-core,litecoin-project/litecoin,MeshCollider/bitcoin,cdecker/bitcoin,GroestlCoin/GroestlCoin,namecoin/namecoin-core,ElementsProject/elements,prusnak/bitcoin,yenliangl/bitcoin,JeremyRubin/bitcoin,anditto/bitcoin,sipsorcery/bitcoin,domob1812/namecore,prusnak/bitcoin,fanquake/bitcoin,jambolo/bitcoin,sipsorcery/bitcoin,domob1812/namecore,jnewbery/bitcoin,GroestlCoin/bitcoin,Sjors/bitcoin,n1bor/bitcoin,bitcoinknots/bitcoin,practicalswift/bitcoin,rnicoll/bitcoin,jamesob/bitcoin,practicalswift/bitcoin,sipsorcery/bitcoin,GroestlCoin/GroestlCoin,yenliangl/bitcoin,jambolo/bitcoin,bitcoinknots/bitcoin,yenliangl/bitcoin,andreaskern/bitcoin,sipsorcery/bitcoin,jnewbery/bitcoin,mruddy/bitcoin,particl/particl-core,namecoin/namecoin-core,Sjors/bitcoin,fujicoin/fujicoin,bitcoin/bitcoin,bitcoinsSG/bitcoin,sstone/bitcoin,jlopp/statoshi,achow101/bitcoin,qtumproject/qtum,alecalve/bitcoin,fanquake/bitcoin,tecnovert/particl-core,Xekyo/bitcoin,MarcoFalke/bitcoin,qtumproject/qtum,jamesob/bitcoin,litecoin-project/litecoin,jonasschnelli/bitcoin,qtumproject/qtum,domob1812/bitcoin,jnewbery/bitcoin,sstone/bitcoin,andreaskern/bitcoin,GroestlCoin/bitcoin,apoelstra/bitcoin,bitcoinsSG/bitcoin,anditto/bitcoin,Xekyo/bitcoin,JeremyRubin/bitcoin,MarcoFalke/bitcoin,kallewoof/bitcoin,mruddy/bitcoin,qtumproject/qtum,ajtowns/bitcoin,ElementsProject/elements,mm-s/bitcoin,dscotese/bitcoin,andreaskern/bitcoin,prusnak/bitcoin,cdecker/bitcoin,instagibbs/bitcoin,sstone/bitcoin,lateminer/bitcoin,anditto/bitcoin,MeshCollider/bitcoin,practicalswift/bitcoin,rnicoll/bitcoin,jamesob/bitcoin,bitcoin/bitcoin,MeshCollider/bitcoin,alecalve/bitcoin,cdecker/bitcoin,tecnovert/particl-core,jambolo/bitcoin,apoelstra/bitcoin,prusnak/bitcoin,dscotese/bitcoin,andreaskern/bitcoin,MeshCollider/bitcoin,andreaskern/bitcoin,achow101/bitcoin,rnicoll/bitcoin,dscotese/bitcoin,n1bor/bitcoin,namecoin/namecoin-core,practicalswift/bitcoin,kallewoof/bitcoin,domob1812/bitcoin,rnicoll/bitcoin,apoelstra/bitcoin,fujicoin/fujicoin,ElementsProject/elements,AkioNak/bitcoin,rnicoll/dogecoin,ajtowns/bitcoin,domob1812/namecore,bitcoinknots/bitcoin,tecnovert/particl-core,GroestlCoin/GroestlCoin,namecoin/namecore,mruddy/bitcoin,prusnak/bitcoin,lateminer/bitcoin,GroestlCoin/bitcoin,alecalve/bitcoin,prusnak/bitcoin,anditto/bitcoin,rnicoll/bitcoin,bitcoinsSG/bitcoin,bitcoinsSG/bitcoin,fanquake/bitcoin,ajtowns/bitcoin,AkioNak/bitcoin,EthanHeilman/bitcoin,namecoin/namecoin-core,fujicoin/fujicoin,pataquets/namecoin-core,achow101/bitcoin,instagibbs/bitcoin,jnewbery/bitcoin,fanquake/bitcoin,n1bor/bitcoin,n1bor/bitcoin,litecoin-project/litecoin,Xekyo/bitcoin,apoelstra/bitcoin,qtumproject/qtum,mruddy/bitcoin,domob1812/namecore,fujicoin/fujicoin,JeremyRubin/bitcoin,jambolo/bitcoin,pataquets/namecoin-core,kallewoof/bitcoin,fujicoin/fujicoin,instagibbs/bitcoin,alecalve/bitcoin,Xekyo/bitcoin,apoelstra/bitcoin,dscotese/bitcoin,MarcoFalke/bitcoin,namecoin/namecore,AkioNak/bitcoin,jambolo/bitcoin,Sjors/bitcoin,jlopp/statoshi,pstratem/bitcoin