Adding patch from upstream to fix libdb issues
Merge branch 'develop'