Skip to content

Commit

Permalink
Fix mutex detection when building bdb on macOS (#1191)
Browse files Browse the repository at this point in the history
* 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.

* Use C++17

Co-authored-by: fanquake <[email protected]>
Co-authored-by: Prasanna Loganathar <[email protected]>
  • Loading branch information
3 people authored Apr 7, 2022
1 parent 3772421 commit e63ae12
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions depends/packages/bdb.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ define $(package)_set_vars
$(package)_config_opts=--disable-shared --enable-cxx --disable-replication
$(package)_config_opts_mingw32=--enable-mingw
$(package)_config_opts_linux=--with-pic
$(package)_cflags+=-Wno-error=implicit-function-declaration
$(package)_cxxflags=-std=c++17
$(package)_cppflags_mingw32=-DUNICODE -D_UNICODE
endef
Expand Down

0 comments on commit e63ae12

Please sign in to comment.