rem: if (level != SOL_SOCKET) {
add: if (level != (int) SOL_SOCKET) {
context: int socket_getsockopt(struct socket *so, int level, int optnum, void *data, size_t *datalen){	struct mbuf *m;		m = m_get(MT_SOOPTS);	if (memcpy(mtod(m, void*), data, *datalen) == NULL)		return ENOMEM;	if (*datalen < sizeof(int))		return EINVAL;	m->m_len = sizeof(int);	if (level != SOL_SOCKET) {		if (so->so_proto && so->so_proto->pr_ctloutput) {			return (*so->so_proto->pr_ctloutput)(PRCO_GETOPT, so, level, optnum, &m);		} else			return ENOPROTOOPT;	} else {		switch(optnum) {			case SO_LINGER:				m->m_len = sizeof(struct linger);				mtod(m, struct linger*)->l_onoff = so->so_options & SO_LINGER;				mtod(m, struct linger*)->l_linger = so->so_linger;				break;			case SO_DEBUG:			case SO_KEEPALIVE:			case SO_DONTROUTE:			case SO_USELOOPBACK:			case SO_BROADCAST:			case SO_REUSEADDR:			case SO_REUSEPORT:			case SO_OOBINLINE:				*mtod(m, int*) = so->so_options & optnum;				break;			case SO_TYPE:				*mtod(m, int*) = so->so_type;				break;			case SO_ERROR:				*mtod(m, int*) = so->so_error;				so->so_error = 0; /* cleared once read */				break;			case SO_SNDBUF:				*mtod(m, int*) = so->so_snd.sb_hiwat;				break;			case SO_RCVBUF:				*mtod(m, int*) = so->so_rcv.sb_hiwat;				break;			case SO_SNDLOWAT:				*mtod(m, int*) = so->so_snd.sb_lowat;				break;			case SO_RCVLOWAT:				*mtod(m, int*) = so->so_rcv.sb_lowat;				break;			case SO_SNDTIMEO:			case SO_RCVTIMEO:			{				int32 val = (optnum == SO_SNDTIMEO ? so->so_snd.sb_timeo : so->so_rcv.sb_timeo);								m->m_len = sizeof(struct timeval);				mtod(m, struct timeval*)->tv_sec = val / 1000000;				mtod(m, struct timeval*)->tv_usec = val % 1000000;				break;			}			default:				m_free(m);				return ENOPROTOOPT;		}		if (m->m_len > *datalen)			/* XXX - horrible fudge... */			m->m_len = *datalen;		memcpy(data, mtod(m, void *), m->m_len);		*datalen = m->m_len;		return 0;	}}