summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1997-08-31 08:24:01 +0000
committerderaadt <deraadt@openbsd.org>1997-08-31 08:24:01 +0000
commit559ddf74fe10d31b60dd81ca1d646f8b03551b0e (patch)
tree0e2e7cf80e4f86e0c27514324e226f3249d1e7ca
parentconsistency (diff)
downloadwireguard-openbsd-559ddf74fe10d31b60dd81ca1d646f8b03551b0e.tar.xz
wireguard-openbsd-559ddf74fe10d31b60dd81ca1d646f8b03551b0e.zip
union wait dies
-rw-r--r--libexec/uucpd/uucpd.c8
-rw-r--r--usr.bin/apply/apply.c11
2 files changed, 9 insertions, 10 deletions
diff --git a/libexec/uucpd/uucpd.c b/libexec/uucpd/uucpd.c
index 78ba5a36bcb..0f956cf2b7a 100644
--- a/libexec/uucpd/uucpd.c
+++ b/libexec/uucpd/uucpd.c
@@ -42,7 +42,7 @@ char copyright[] =
#ifndef lint
/*static char sccsid[] = "from: @(#)uucpd.c 5.10 (Berkeley) 2/26/91";*/
-static char rcsid[] = "$Id: uucpd.c,v 1.10 1997/08/04 19:25:13 deraadt Exp $";
+static char rcsid[] = "$Id: uucpd.c,v 1.11 1997/08/31 08:24:01 deraadt Exp $";
#endif /* not lint */
/*
@@ -245,14 +245,14 @@ struct utmp utmp;
void
dologout()
{
- union wait status;
+ int status;
int save_errno = errno;
int pid, wtmp;
#ifdef BSDINETD
- while ((pid=wait((int *)&status)) > 0) {
+ while ((pid=wait(&status)) > 0) {
#else /* !BSDINETD */
- while ((pid=wait3((int *)&status,WNOHANG,0)) > 0) {
+ while ((pid=wait3(&status, WNOHANG, 0)) > 0) {
#endif /* !BSDINETD */
wtmp = open(_PATH_WTMP, O_WRONLY|O_APPEND);
if (wtmp >= 0) {
diff --git a/usr.bin/apply/apply.c b/usr.bin/apply/apply.c
index 26f0fd844a7..03b5ff8f391 100644
--- a/usr.bin/apply/apply.c
+++ b/usr.bin/apply/apply.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apply.c,v 1.4 1997/07/29 02:54:07 bitblt Exp $ */
+/* $OpenBSD: apply.c,v 1.5 1997/08/31 08:25:55 deraadt Exp $ */
/* $NetBSD: apply.c,v 1.3 1995/03/25 03:38:23 glass Exp $ */
/*-
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)apply.c 8.4 (Berkeley) 4/4/94";
#else
-static char rcsid[] = "$OpenBSD: apply.c,v 1.4 1997/07/29 02:54:07 bitblt Exp $";
+static char rcsid[] = "$OpenBSD: apply.c,v 1.5 1997/08/31 08:25:55 deraadt Exp $";
#endif
#endif /* not lint */
@@ -197,9 +197,8 @@ system(command)
const char *command;
{
static char *name, *shell;
- union wait pstat;
pid_t pid;
- int omask;
+ int omask, pstat;
sig_t intsave, quitsave;
if (shell == NULL) {
@@ -224,11 +223,11 @@ system(command)
}
intsave = signal(SIGINT, SIG_IGN);
quitsave = signal(SIGQUIT, SIG_IGN);
- pid = waitpid(pid, (int *)&pstat, 0);
+ pid = waitpid(pid, &pstat, 0);
(void)sigsetmask(omask);
(void)signal(SIGINT, intsave);
(void)signal(SIGQUIT, quitsave);
- return(pid == -1 ? -1 : pstat.w_status);
+ return(pid == -1 ? -1 : pstat);
}
void