Compiling C++ code with -D_XOPEN_SOURCE=600 causes problems on OpenBSD. If that define is set, the C++ standard header detection routine in BDB's configure script fails due to a missing type name for locale_t (see https://gist.github.com/theStack/b41884e31ebc5cdca3220bcaa674cb70 for the relevant config.log part).
This results in HAVE_CXX_STDHEADERS not being defined, which then it turn leads to the inclusion of <iostream.h> (rather than <iostream>), which doesn't exist, as described in #28963.
According to a mailing list post discussing a similar problem [1], "OpenBSD provides the POSIX APIs by default", so we don't need this define anyway and can remove it. This fixes the BDB build problem as described in issue #28963. See also https://github.com/google/flatbuffers/pull/6205/commits/f87e75ae71a2301daf2ad59b180977fc30c6abe4 for a similar fix for google's flatbuffer project.
Tested on OpenBSD 7.4 with clang 13.0.0. Fixes #28963.
[1] https://www.mail-archive.com/tech@openbsd.org/msg63386.html