diff options
Diffstat (limited to 'package/ppp/patches/patch-pppd_main_c')
-rw-r--r-- | package/ppp/patches/patch-pppd_main_c | 137 |
1 files changed, 131 insertions, 6 deletions
diff --git a/package/ppp/patches/patch-pppd_main_c b/package/ppp/patches/patch-pppd_main_c index 630420deb..adc00acd1 100644 --- a/package/ppp/patches/patch-pppd_main_c +++ b/package/ppp/patches/patch-pppd_main_c @@ -1,5 +1,5 @@ --- ppp-2.4.5.orig/pppd/main.c 2009-11-16 23:26:07.000000000 +0100 -+++ ppp-2.4.5/pppd/main.c 2011-01-16 15:51:05.000000000 +0100 ++++ ppp-2.4.5/pppd/main.c 2014-03-17 16:13:13.000000000 +0100 @@ -90,6 +90,7 @@ #include <sys/socket.h> #include <netinet/in.h> @@ -8,14 +8,97 @@ #include "pppd.h" #include "magic.h" -@@ -228,6 +229,7 @@ static struct subprocess *children; +@@ -159,10 +160,10 @@ TDB_CONTEXT *pppdb; /* database for sto + + char db_key[32]; + +-int (*holdoff_hook) __P((void)) = NULL; +-int (*new_phase_hook) __P((int)) = NULL; +-void (*snoop_recv_hook) __P((unsigned char *p, int len)) = NULL; +-void (*snoop_send_hook) __P((unsigned char *p, int len)) = NULL; ++int (*holdoff_hook) (void) = NULL; ++int (*new_phase_hook) (int) = NULL; ++void (*snoop_recv_hook) (unsigned char *p, int len) = NULL; ++void (*snoop_send_hook) (unsigned char *p, int len) = NULL; + + static int conn_running; /* we have a [dis]connector running */ + static int fd_loop; /* fd for getting demand-dial packets */ +@@ -218,7 +219,7 @@ bool bundle_terminating; + struct subprocess { + pid_t pid; + char *prog; +- void (*done) __P((void *)); ++ void (*done) (void *); + void *arg; + int killable; + struct subprocess *next; +@@ -228,38 +229,39 @@ static struct subprocess *children; /* Prototypes for procedures local to this file. */ +-static void setup_signals __P((void)); +-static void create_pidfile __P((int pid)); +-static void create_linkpidfile __P((int pid)); +-static void cleanup __P((void)); +-static void get_input __P((void)); +-static void calltimeout __P((void)); +-static struct timeval *timeleft __P((struct timeval *)); +-static void kill_my_pg __P((int)); +-static void hup __P((int)); +-static void term __P((int)); +-static void chld __P((int)); +-static void toggle_debug __P((int)); +-static void open_ccp __P((int)); +-static void bad_signal __P((int)); +-static void holdoff_end __P((void *)); +-static void forget_child __P((int pid, int status)); +-static int reap_kids __P((void)); +-static void childwait_end __P((void *)); +static void check_time(void); - static void setup_signals __P((void)); - static void create_pidfile __P((int pid)); - static void create_linkpidfile __P((int pid)); ++static void setup_signals (void); ++static void create_pidfile (int pid); ++static void create_linkpidfile (int pid); ++static void cleanup (void); ++static void get_input (void); ++static void calltimeout (void); ++static struct timeval *timeleft (struct timeval *); ++static void kill_my_pg (int); ++static void hup (int); ++static void term (int); ++static void chld (int); ++static void toggle_debug (int); ++static void open_ccp (int); ++static void bad_signal (int); ++static void holdoff_end (void *); ++static void forget_child (int pid, int status); ++static int reap_kids (void); ++static void childwait_end (void *); + + #ifdef USE_TDB +-static void update_db_entry __P((void)); +-static void add_db_key __P((const char *)); +-static void delete_db_key __P((const char *)); +-static void cleanup_db __P((void)); ++static void update_db_entry (void); ++static void add_db_key (const char *); ++static void delete_db_key (const char *); ++static void cleanup_db (void); + #endif + +-static void handle_events __P((void)); +-void print_link_stats __P((void)); ++static void handle_events (void); ++void print_link_stats (void); + +-extern char *ttyname __P((int)); +-extern char *getlogin __P((void)); +-int main __P((int, char *[])); ++extern char *ttyname (int); ++extern char *getlogin (void); ++int main (int, char *[]); + + #ifdef ultrix + #undef O_NONBLOCK @@ -530,6 +532,7 @@ main(argc, argv) info("Starting link"); } @@ -24,7 +107,14 @@ gettimeofday(&start_time, NULL); script_unsetenv("CONNECT_TIME"); script_unsetenv("BYTES_SENT"); -@@ -1263,6 +1266,36 @@ struct callout { +@@ -1257,19 +1260,49 @@ update_link_stats(u) + struct callout { + struct timeval c_time; /* time at which to call routine */ + void *c_arg; /* argument to routine */ +- void (*c_func) __P((void *)); /* routine */ ++ void (*c_func) (void *); /* routine */ + struct callout *c_next; + }; static struct callout *callout = NULL; /* Callout list */ static struct timeval timenow; /* Current time */ @@ -61,6 +151,23 @@ /* * timeout - Schedule a timeout. + */ + void + timeout(func, arg, secs, usecs) +- void (*func) __P((void *)); ++ void (*func) (void *); + void *arg; + int secs, usecs; + { +@@ -1308,7 +1341,7 @@ timeout(func, arg, secs, usecs) + */ + void + untimeout(func, arg) +- void (*func) __P((void *)); ++ void (*func) (void *); + void *arg; + { + struct callout **copp, *freep; @@ -1333,6 +1366,8 @@ calltimeout() { struct callout *p; @@ -79,3 +186,21 @@ gettimeofday(&timenow, NULL); tvp->tv_sec = callout->c_time.tv_sec - timenow.tv_sec; +@@ -1692,7 +1729,7 @@ run_program(prog, args, must_exist, done + char *prog; + char **args; + int must_exist; +- void (*done) __P((void *)); ++ void (*done) (void *); + void *arg; + int wait; + { +@@ -1767,7 +1804,7 @@ void + record_child(pid, prog, done, arg, killable) + int pid; + char *prog; +- void (*done) __P((void *)); ++ void (*done) (void *); + void *arg; + int killable; + { |