--- a/mrlogin/mrlogin.c	2016-04-29 19:22:08.000000000 +0200
+++ b/mrlogin/mrlogin.c	2019-10-29 02:25:39.095172149 +0100
@@ -476,7 +476,7 @@
 void
 catch_child(int ignore)
 {
-	union wait status;
+	int status;
 	int pid;
 
 	(void)ignore;
@@ -487,7 +487,7 @@
 			return;
 		/* if the child (reader) dies, just quit */
 		if (pid < 0 || (pid == childpid && !WIFSTOPPED(status)))
-			done((int)(status.w_termsig | status.w_retcode));
+			done((int)(WTERMSIG(status) | WEXITSTATUS(status)));
 	}
 	/* NOTREACHED */
 }
