Skip to content

Commit d0a829e

Browse files
committed
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.
1 parent f5bd46a commit d0a829e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

depends/packages/bdb.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ define $(package)_set_vars
1010
$(package)_config_opts=--disable-shared --enable-cxx --disable-replication --enable-option-checking
1111
$(package)_config_opts_mingw32=--enable-mingw
1212
$(package)_config_opts_linux=--with-pic
13+
$(package)_cflags+=-Wno-error=implicit-function-declaration
1314
$(package)_cxxflags=-std=c++11
1415
$(package)_cppflags_mingw32=-DUNICODE -D_UNICODE
1516
endef

0 commit comments

Comments
 (0)