mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 21:25:12 +02:00
ipset: fix compile error on 2.6.31-rt
ip_set.c:42:8: warning: type defaults to 'int' in declaration of 'DECLARE_MUTEX' 2.6.31-rt has cleaned up the naming mess in semaphore.h. Without making use of #if hackery, we can use struct semaphore as declaration plus an explicit sema_init() call.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
|
|
||||||
|
|
||||||
|
- build: compile fixes for 2.6.31-rt
|
||||||
|
|
||||||
|
|
||||||
Xtables-addons 1.18 (September 09 2009)
|
Xtables-addons 1.18 (September 09 2009)
|
||||||
=======================================
|
=======================================
|
||||||
- build: support for Linux 2.6.31
|
- build: support for Linux 2.6.31
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
static struct list_head set_type_list; /* all registered sets */
|
static struct list_head set_type_list; /* all registered sets */
|
||||||
static struct ip_set **ip_set_list; /* all individual sets */
|
static struct ip_set **ip_set_list; /* all individual sets */
|
||||||
static DEFINE_RWLOCK(ip_set_lock); /* protects the lists and the hash */
|
static DEFINE_RWLOCK(ip_set_lock); /* protects the lists and the hash */
|
||||||
static DECLARE_MUTEX(ip_set_app_mutex); /* serializes user access */
|
static struct semaphore ip_set_app_mutex; /* serializes user access */
|
||||||
static ip_set_id_t ip_set_max = CONFIG_IP_NF_SET_MAX;
|
static ip_set_id_t ip_set_max = CONFIG_IP_NF_SET_MAX;
|
||||||
static ip_set_id_t ip_set_bindings_hash_size = CONFIG_IP_NF_SET_HASHSIZE;
|
static ip_set_id_t ip_set_bindings_hash_size = CONFIG_IP_NF_SET_HASHSIZE;
|
||||||
static struct list_head *ip_set_hash; /* hash of bindings */
|
static struct list_head *ip_set_hash; /* hash of bindings */
|
||||||
@@ -2016,6 +2016,7 @@ static int __init ip_set_init(void)
|
|||||||
int res;
|
int res;
|
||||||
ip_set_id_t i;
|
ip_set_id_t i;
|
||||||
|
|
||||||
|
sema_init(&ip_set_app_mutex, 1);
|
||||||
get_random_bytes(&ip_set_hash_random, 4);
|
get_random_bytes(&ip_set_hash_random, 4);
|
||||||
if (max_sets)
|
if (max_sets)
|
||||||
ip_set_max = max_sets;
|
ip_set_max = max_sets;
|
||||||
|
Reference in New Issue
Block a user