As of Linux kernel commit 2351ec533ed0dd56052ab96988d2161d5ecc8ed9, semaphore.h was moved from asm/ to linux/, which breaks building of ipset. Add compat glue to ip_set.c to fix building on 2.6.27 an onwards.
And add a few const here and there.