lib: Move some routines around in msghdr.c