diff options
Diffstat (limited to 'accel-pppd/radius')
-rw-r--r-- | accel-pppd/radius/dm_coa.c | 4 | ||||
-rw-r--r-- | accel-pppd/radius/packet.c | 4 | ||||
-rw-r--r-- | accel-pppd/radius/radius.c | 3 | ||||
-rw-r--r-- | accel-pppd/radius/req.c | 4 | ||||
-rw-r--r-- | accel-pppd/radius/stat_accm.c | 3 |
5 files changed, 13 insertions, 5 deletions
diff --git a/accel-pppd/radius/dm_coa.c b/accel-pppd/radius/dm_coa.c index 366bb417..005ecfd1 100644 --- a/accel-pppd/radius/dm_coa.c +++ b/accel-pppd/radius/dm_coa.c @@ -256,7 +256,7 @@ static struct dm_coa_serv_t serv = { .hnd.read = dm_coa_read, }; -static void __init init(void) +static void init(void) { struct sockaddr_in addr; @@ -293,3 +293,5 @@ static void __init init(void) triton_md_enable_handler(&serv.hnd, MD_MODE_READ); triton_context_wakeup(&serv.ctx); } + +DEFINE_INIT(101, init); diff --git a/accel-pppd/radius/packet.c b/accel-pppd/radius/packet.c index b6230d64..db45c6a9 100644 --- a/accel-pppd/radius/packet.c +++ b/accel-pppd/radius/packet.c @@ -648,9 +648,11 @@ int rad_packet_send(struct rad_packet_t *pack, int fd, struct sockaddr_in *addr) return 0; } -static void __init init(void) +static void init(void) { attr_pool = mempool_create(sizeof(struct rad_attr_t)); packet_pool = mempool_create(sizeof(struct rad_packet_t)); buf_pool = mempool_create(REQ_LENGTH_MAX); } + +DEFINE_INIT(101, init); diff --git a/accel-pppd/radius/radius.c b/accel-pppd/radius/radius.c index 1900e0fc..2bf9bd47 100644 --- a/accel-pppd/radius/radius.c +++ b/accel-pppd/radius/radius.c @@ -535,7 +535,7 @@ static int load_config(void) return 0; } -static void __init radius_init(void) +static void radius_init(void) { char *opt; char *dict = DICTIONARY; @@ -579,3 +579,4 @@ static void __init radius_init(void) stat_interim_query_5m = stat_accm_create(5 * 60); } +DEFINE_INIT(100, radius_init); diff --git a/accel-pppd/radius/req.c b/accel-pppd/radius/req.c index 1fa79ad2..7464ac9a 100644 --- a/accel-pppd/radius/req.c +++ b/accel-pppd/radius/req.c @@ -268,7 +268,7 @@ int rad_req_wait(struct rad_req_t *req, int timeout) return 0; } -void __init req_init(void) +static void req_init(void) { urandom_fd = open("/dev/urandom", O_RDONLY); if (!urandom_fd) { @@ -276,3 +276,5 @@ void __init req_init(void) _exit(EXIT_FAILURE); } } + +DEFINE_INIT(101, req_init); diff --git a/accel-pppd/radius/stat_accm.c b/accel-pppd/radius/stat_accm.c index 8d4ad3df..53c23cbd 100644 --- a/accel-pppd/radius/stat_accm.c +++ b/accel-pppd/radius/stat_accm.c @@ -90,8 +90,9 @@ unsigned long stat_accm_get_avg(struct stat_accm_t *s) return val; } -static void __init init(void) +static void init(void) { item_pool = mempool_create(sizeof(struct item_t)); } +DEFINE_INIT(101, init); |