Log Message: Fix build on SmartOS. If this is irrelevant, please revert them. * Use OS_VARIANT to include db_185.h * Include posix stat function in ifdef to avoid binary change