src_ext: patch dose to be osx/bsd compatible
Merge pull request #1095 from hhugo/master

src_ext: patch dose to be osx/bsd compatible