summaryrefslogtreecommitdiff
path: root/accel-pppd/auth
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2011-05-30 11:24:27 +0400
committerKozlov Dmitry <dima@server>2011-05-30 11:24:27 +0400
commit276beb78cea777ff8d81d9f5a4cd107c5a3dc2aa (patch)
treef50c4e781ba13c3ee59382a4466cfafa31ef464a /accel-pppd/auth
parent01afc34e830f2adf94c191a3c4f2761888dae53b (diff)
downloadaccel-ppp-276beb78cea777ff8d81d9f5a4cd107c5a3dc2aa.tar.gz
accel-ppp-276beb78cea777ff8d81d9f5a4cd107c5a3dc2aa.zip
rewrited initialization procedure (fix gcc-4.6 builds)
Diffstat (limited to 'accel-pppd/auth')
-rw-r--r--accel-pppd/auth/auth_chap_md5.c3
-rw-r--r--accel-pppd/auth/auth_mschap_v1.c3
-rw-r--r--accel-pppd/auth/auth_mschap_v2.c3
-rw-r--r--accel-pppd/auth/auth_pap.c3
4 files changed, 8 insertions, 4 deletions
diff --git a/accel-pppd/auth/auth_chap_md5.c b/accel-pppd/auth/auth_chap_md5.c
index a9a5572..8744160 100644
--- a/accel-pppd/auth/auth_chap_md5.c
+++ b/accel-pppd/auth/auth_chap_md5.c
@@ -414,7 +414,7 @@ static void chap_recv(struct ppp_handler_t *h)
log_ppp_warn("chap-md5: unknown code received %x\n", hdr->code);
}
-static void __init auth_chap_md5_init()
+static void auth_chap_md5_init()
{
char *opt;
@@ -445,3 +445,4 @@ static void __init auth_chap_md5_init()
log_emerg("chap-md5: failed to register handler\n");
}
+DEFINE_INIT(4, auth_chap_md5_init);
diff --git a/accel-pppd/auth/auth_mschap_v1.c b/accel-pppd/auth/auth_mschap_v1.c
index 237e3aa..85e3037 100644
--- a/accel-pppd/auth/auth_mschap_v1.c
+++ b/accel-pppd/auth/auth_mschap_v1.c
@@ -494,7 +494,7 @@ static void chap_recv(struct ppp_handler_t *h)
log_ppp_warn("mschap-v1: unknown code received %x\n", hdr->code);
}
-static void __init auth_mschap_v1_init()
+static void auth_mschap_v1_init()
{
char *opt;
@@ -523,3 +523,4 @@ static void __init auth_mschap_v1_init()
log_emerg("mschap-v1: failed to register handler\n");
}
+DEFINE_INIT(4, auth_mschap_v1_init);
diff --git a/accel-pppd/auth/auth_mschap_v2.c b/accel-pppd/auth/auth_mschap_v2.c
index c14e44f..f7407e8 100644
--- a/accel-pppd/auth/auth_mschap_v2.c
+++ b/accel-pppd/auth/auth_mschap_v2.c
@@ -629,7 +629,7 @@ static void chap_recv(struct ppp_handler_t *h)
log_ppp_warn("mschap-v2: unknown code received %x\n",hdr->code);
}
-static void __init auth_mschap_v2_init()
+static void auth_mschap_v2_init()
{
urandom_fd = open("/dev/urandom", O_RDONLY);
if (urandom_fd < 0) {
@@ -641,3 +641,4 @@ static void __init auth_mschap_v2_init()
log_emerg("mschap-v2: failed to register handler\n");
}
+DEFINE_INIT(4, auth_mschap_v2_init);
diff --git a/accel-pppd/auth/auth_pap.c b/accel-pppd/auth/auth_pap.c
index c03a9a1..5b20210 100644
--- a/accel-pppd/auth/auth_pap.c
+++ b/accel-pppd/auth/auth_pap.c
@@ -265,7 +265,7 @@ static void pap_recv(struct ppp_handler_t *h)
}
}
-static void __init auth_pap_init()
+static void auth_pap_init()
{
char *opt;
@@ -280,3 +280,4 @@ static void __init auth_pap_init()
ppp_auth_register_handler(&pap);
}
+DEFINE_INIT(4, auth_pap_init);