Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 1 | Fix build issue do to Deprecate union wait and remove support from wait functions [BZ #19613] |
| 2 | |
| 3 | | rlogin.c: In function 'catch_child': |
| 4 | | rlogin.c:463:13: error: storage size of 'status' isn't known |
| 5 | | union wait status; |
| 6 | |
| 7 | https://sourceware.org/ml/libc-alpha/2016-02/msg00342.html |
| 8 | |
| 9 | Upstream-Status: Inappropriate [ no upstream maintaner ] |
| 10 | |
Patrick Williams | b9af875 | 2023-01-30 13:28:01 -0600 | [diff] [blame^] | 11 | Signed-off-by: Armin Kuster <akuster@mvista.com> |
Patrick Williams | ddad1a1 | 2017-02-23 20:36:32 -0600 | [diff] [blame] | 12 | |
| 13 | Index: netkit-rsh-0.17/rlogin/rlogin.c |
| 14 | =================================================================== |
| 15 | --- netkit-rsh-0.17.orig/rlogin/rlogin.c |
| 16 | +++ netkit-rsh-0.17/rlogin/rlogin.c |
| 17 | @@ -460,7 +460,7 @@ writeroob(int ignore) |
| 18 | void |
| 19 | catch_child(int ignore) |
| 20 | { |
| 21 | - union wait status; |
| 22 | + int status; |
| 23 | int pid; |
| 24 | |
| 25 | (void)ignore; |
| 26 | @@ -471,7 +471,7 @@ catch_child(int ignore) |
| 27 | return; |
| 28 | /* if the child (reader) dies, just quit */ |
| 29 | if (pid < 0 || (pid == childpid && !WIFSTOPPED(status))) |
| 30 | - done((int)(status.w_termsig | status.w_retcode)); |
| 31 | + done((int)(WTERMSIG(status) | WEXITSTATUS(status))); |
| 32 | } |
| 33 | /* NOTREACHED */ |
| 34 | } |