Description: minor fixes for Alpine 3.21+ Author: Tianon (& Chet, for fixes borrowed/backported) diff --git a/lib/glob/glob.c b/lib/glob/glob.c index 08a7da85..915bac3f 100644 --- a/lib/glob/glob.c +++ b/lib/glob/glob.c @@ -45,6 +45,7 @@ #include "stdc.h" #include "memalloc.h" +#include "sig.h" // needed by "quit.h" #include "quit.h" #include "glob.h" diff --git a/lib/glob/strmatch.c b/lib/glob/strmatch.c index 4d9c68d0..cea9bd86 100644 --- a/lib/glob/strmatch.c +++ b/lib/glob/strmatch.c @@ -25,7 +25,7 @@ #include "strmatch.h" extern int xstrmatch __P((char *, char *, int)); -#if defined (HAVE_MULTIBYTE) +#if defined (HANDLE_MULTIBYTE) extern int internal_wstrmatch __P((wchar_t *, wchar_t *, int)); #endif diff --git a/nojobs.c b/nojobs.c index a3d51f67..7303f07f 100644 --- a/nojobs.c +++ b/nojobs.c @@ -45,6 +45,7 @@ #include "shell.h" #include "jobs.h" +#include "trap.h" #include "builtins/builtext.h" /* for wait_builtin */ @@ -398,6 +399,7 @@ reap_dead_jobs () } /* Initialize the job control mechanism, and set up the tty stuff. */ +int initialize_job_control (force) int force; { @@ -838,6 +840,7 @@ static TTYSTRUCT shell_tty_info; static int got_tty_state; /* Fill the contents of shell_tty_info with the current tty info. */ +int get_tty_state () { int tty; @@ -869,10 +872,12 @@ set_tty_state () } /* Give the terminal to PGRP. */ +int give_terminal_to (pgrp, force) pid_t pgrp; int force; { + return 0; } /* Stop a pipeline. */ diff --git a/parse.y b/parse.y index 5211fbcb..f0cdfbf4 100644 --- a/parse.y +++ b/parse.y @@ -69,6 +69,9 @@ #if defined (JOB_CONTROL) # include "jobs.h" +#else +extern int cleanup_dead_jobs __P((void)); +extern int count_all_jobs __P((void)); #endif /* JOB_CONTROL */ #if defined (ALIAS) diff --git a/shell.c b/shell.c index 2fd8179b..45b77f9e 100644 --- a/shell.c +++ b/shell.c @@ -57,6 +59,9 @@ #if defined (JOB_CONTROL) #include "jobs.h" +#else +extern int initialize_job_control __P((int)); +extern int get_tty_state __P((void)); #endif /* JOB_CONTROL */ #include "input.h" diff --git a/sig.c b/sig.c index 8bc45c17..d31ca87b 100644 --- a/sig.c +++ b/sig.c @@ -60,6 +60,12 @@ extern int executing_list; extern int comsub_ignore_return; extern int parse_and_execute_level, shell_initialized; +extern void initialize_siglist (); + +#if !defined (JOB_CONTROL) +extern void initialize_job_signals __P((void)); +#endif + /* Non-zero after SIGINT. */ volatile int interrupt_state = 0; diff --git a/siglist.h b/siglist.h index 4cb65308..bc0ea441 100644 --- a/siglist.h +++ b/siglist.h @@ -18,6 +18,8 @@ along with Bash. If not, see . */ +#include + #if !defined (_SIGLIST_H_) #define _SIGLIST_H_ diff --git a/subst.c b/subst.c index 089457fb..2e24ac4e 100644 --- a/subst.c +++ b/subst.c @@ -2625,6 +2625,7 @@ expand_assignment_string_to_string (string, quoted) char * expand_arith_string (string, quoted) char *string; + int quoted; { return (expand_string_if_necessary (string, quoted, expand_string)); } diff --git a/support/bashversion.c b/support/bashversion.c index abf1aa8d..59c2321e 100644 --- a/support/bashversion.c +++ b/support/bashversion.c @@ -47,6 +47,9 @@ extern char *optarg; extern char *dist_version; extern int patch_level; +extern char *shell_version_string __P((void)); +extern void show_shell_version __P((int)); + char *shell_name = "bash"; char *progname;