fixed errno problem
compile script
Merge pull request #1 from Viknet/master

fixed errno problem