Fix Windows build warnings.

winsock2.h needs to be included before windows.h.
Separate declarations and code.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
3 files changed