Index: sys/compat/linux/linux_socket.h =================================================================== --- sys/compat/linux/linux_socket.h +++ sys/compat/linux/linux_socket.h @@ -170,12 +170,6 @@ /* Socket defines */ #define LINUX_SOL_SOCKET 1 -#define LINUX_SOL_IP 0 -#define LINUX_SOL_TCP 6 -#define LINUX_SOL_UDP 17 -#define LINUX_SOL_IPV6 41 -#define LINUX_SOL_IPX 256 -#define LINUX_SOL_AX25 257 #define LINUX_SO_DEBUG 1 #define LINUX_SO_REUSEADDR 2 Index: sys/compat/linux/linux_socket.c =================================================================== --- sys/compat/linux/linux_socket.c +++ sys/compat/linux/linux_socket.c @@ -92,10 +92,9 @@ linux_to_bsd_sockopt_level(int level) { - switch (level) { - case LINUX_SOL_SOCKET: + if (level == LINUX_SOL_SOCKET) return (SOL_SOCKET); - } + /* Remaining values are RFC-defined protocol numbers. */ return (level); } @@ -103,10 +102,8 @@ bsd_to_linux_sockopt_level(int level) { - switch (level) { - case SOL_SOCKET: + if (level == SOL_SOCKET) return (LINUX_SOL_SOCKET); - } return (level); }