recv, write and sendto return ssize_t
declare inline functions in a more portable way

Or at least in a way that works without a -O[1-3] flag...