BSD doesn't define SOL_IP; use IPPROTO_IP in that case.