Add socinfo.c from 2.6.38