fix #1291
eliminate warning of implicitly defined functions
Merge pull request #1400 from coolwanglu/header_fix

fix #1291