summaryrefslogtreecommitdiff
path: root/accel-pppd/extra
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pppd/extra')
-rw-r--r--accel-pppd/extra/chap-secrets.c3
-rw-r--r--accel-pppd/extra/ippool.c4
-rw-r--r--accel-pppd/extra/pppd_compat.c4
-rw-r--r--accel-pppd/extra/shaper_tbf.c3
-rw-r--r--accel-pppd/extra/sigchld.c4
5 files changed, 13 insertions, 5 deletions
diff --git a/accel-pppd/extra/chap-secrets.c b/accel-pppd/extra/chap-secrets.c
index a42ab236..ee83bce5 100644
--- a/accel-pppd/extra/chap-secrets.c
+++ b/accel-pppd/extra/chap-secrets.c
@@ -268,7 +268,7 @@ static void load_config(void)
conf_gw_ip_address = inet_addr(opt);
}
-static void __init init(void)
+static void init(void)
{
load_config();
@@ -280,3 +280,4 @@ static void __init init(void)
triton_event_register_handler(EV_CONFIG_RELOAD, (triton_event_func)load_config);
}
+DEFINE_INIT(100, init);
diff --git a/accel-pppd/extra/ippool.c b/accel-pppd/extra/ippool.c
index 20da17c0..b5711d02 100644
--- a/accel-pppd/extra/ippool.c
+++ b/accel-pppd/extra/ippool.c
@@ -182,7 +182,7 @@ static struct ipdb_t ipdb = {
.put = put_ip,
};
-static void __init ipool_init(void)
+static void ippool_init(void)
{
struct conf_sect_t *s = conf_get_section("ip-pool");
struct conf_option_t *opt;
@@ -206,3 +206,5 @@ static void __init ipool_init(void)
ipdb_register(&ipdb);
}
+DEFINE_INIT(100, ippool_init);
+
diff --git a/accel-pppd/extra/pppd_compat.c b/accel-pppd/extra/pppd_compat.c
index 5fa9bebf..aa6f6b59 100644
--- a/accel-pppd/extra/pppd_compat.c
+++ b/accel-pppd/extra/pppd_compat.c
@@ -497,7 +497,7 @@ static void fill_env(char **env, struct pppd_compat_pd_t *pd)
}
}
-static void __init init(void)
+static void init(void)
{
char *opt;
@@ -537,3 +537,5 @@ static void __init init(void)
}
#endif
}
+
+DEFINE_INIT(101, init);
diff --git a/accel-pppd/extra/shaper_tbf.c b/accel-pppd/extra/shaper_tbf.c
index c276869f..997b0e9f 100644
--- a/accel-pppd/extra/shaper_tbf.c
+++ b/accel-pppd/extra/shaper_tbf.c
@@ -1256,7 +1256,7 @@ static int clock_init(void)
return 0;
}
-static void __init init(void)
+static void init(void)
{
if (clock_init())
return;
@@ -1281,3 +1281,4 @@ static void __init init(void)
cli_show_ses_register("rate-limit", "rate limit down-stream/up-stream (Kbit)", print_rate);
}
+DEFINE_INIT(100, init);
diff --git a/accel-pppd/extra/sigchld.c b/accel-pppd/extra/sigchld.c
index 08bab93d..8f1a979e 100644
--- a/accel-pppd/extra/sigchld.c
+++ b/accel-pppd/extra/sigchld.c
@@ -109,8 +109,10 @@ void __export sigchld_unlock()
pthread_mutex_unlock(&handlers_lock);
}
-static void __init init(void)
+static void init(void)
{
if (pthread_create(&sigchld_thr, NULL, sigchld_thread, NULL))
log_emerg("sigchld: pthread_create: %s\n", strerror(errno));
}
+
+DEFINE_INIT(100, init); \ No newline at end of file