Initialize struct msghdr by hand

Avoids C90 warnings.
Fix signed and unsigned compare
Include stdio.h for size_t