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.
#include <linux/errno.h>
#include <asm/uaccess.h>
#include <asm/bitops.h>
-#include <asm/semaphore.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
+# include <linux/semaphore.h>
+#else
+# include <asm/semaphore.h>
+#endif
#include <linux/spinlock.h>
#include <linux/vmalloc.h>