Browse Source

Fix compile errors on BSD

develop
Damien Goutte-Gattat 8 years ago
parent
commit
11726b6f9f
  1. 6
      src/wait4pid.c

6
src/wait4pid.c

@ -257,7 +257,7 @@ wait4all(pid_t *pids, size_t len)
evts = xmalloc(sizeof(struct kevent) * len);
for ( i = 0; i < len; i++ ) {
EV_SET(evts[i], pids[i], EVFILT_PROC, EV_ENABLE, NOTE_EXIT, 0, 0):
EV_SET(&evts[i], pids[i], EVFILT_PROC, EV_ENABLE, NOTE_EXIT, 0, 0);
}
i = kevent(fd, evts, len, NULL, 0, 0);
free(evts);
@ -270,8 +270,8 @@ wait4all(pid_t *pids, size_t len)
if ( kevent(fd, NULL, 0, &evt, 1, 0) <= 0 )
return -1;
if ( evt->ident == pids[len - 1] )
ec = evt->data;
if ( evt.ident == pids[len - 1] )
ec = evt.data;
nproc -= 1;
}

Loading…
Cancel
Save