These patches must be applied to the bdb-5.1.29 source from Oracle, and then compiled, for the Mac client to build. Using an existing 5.1.29 binary will not work; as it was likely compiled with gcc; which OSX no longer natively supports.