Include type definitions when declaring functions that use them.

A header should not reference a type for which it doesn't provide a
declaration, ideally via the appropriate other header.  I wanted to
call cf_closesocket but pulling in the header that provides it gave me
compiler errors because of references to undefined types in functions
I wasn't interested in.
Merge pull request #1900 from ediosyncratic/header-fix

Include type definitions when declaring functions that use them.