File risc-v.patch of Package bash
Based on 01070d43248fb97f3b2a08d780ae5a392573ce34 Mon Sep 17 00:00:00 2001
From: Chet Ramey <chet.ramey@case.edu>
Date: Fri, 18 Jul 2025 11:53:01 -0400
Subject: fix for `wait -n' in posix mode; fix for long messages in readline;
fix for short reads by `source' builtin; fix for crash on RISC-V machines;
fix for bad memory read when getopts is called twice with different sets of
arguments
---
command.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/command.h b/command.h
index 189b00de..2c25b341 100644
--- a/command.h
+++ b/command.h
@@ -195,7 +195,6 @@ typedef struct element {
/* What a command looks like. */
typedef struct command {
- enum command_type type; /* FOR CASE WHILE IF CONNECTION or SIMPLE. */
int flags; /* Flags controlling execution environment. */
int line; /* line number the command starts on */
REDIRECT *redirects; /* Special redirects for FOR CASE, etc. */
@@ -223,6 +222,7 @@ typedef struct command {
struct subshell_com *Subshell;
struct coproc_com *Coproc;
} value;
+ enum command_type type; /* FOR CASE WHILE IF CONNECTION SIMPLE, etc. */
} COMMAND;
/* Structure used to represent the CONNECTION type. */
@@ -337,9 +337,9 @@ typedef struct cond_com {
typedef struct simple_com {
int flags; /* See description of CMD flags. */
int line; /* line number the command starts on */
+ REDIRECT *redirects; /* Redirections to perform. */
WORD_LIST *words; /* The program name, the arguments,
variable assignments, etc. */
- REDIRECT *redirects; /* Redirections to perform. */
} SIMPLE_COM;
/* The "function definition" command. */