Fixing compilation errors for linux port.
Merge pull request #2467 from dumganhar/master

Fixing compilation errors for linux port.