]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
ipset: adjust semaphore.h include for kernel >= 2.6.27
authorJames King <t.james.king@gmail.com>
Wed, 27 Aug 2008 01:12:33 +0000 (18:12 -0700)
committerJan Engelhardt <jengelh@medozas.de>
Fri, 29 Aug 2008 00:27:09 +0000 (20:27 -0400)
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.

extensions/ipset/ip_set.c

index 8be927457a286ca0ac878d66bada41b05d82a355..84b47a0dd2bb7bad8a8e868b9eafa986012ea9be 100644 (file)
 #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>