Message ID | 1297959841-41235-1-git-send-email-gingold@adacore.com |
---|---|
State | New |
Headers | show |
On 02/17/2011 05:24 PM, Tristan Gingold wrote: > - siginfo_t siginfo; > + int sig; > > - err = sigwaitinfo(&info->mask,&siginfo); > + err = sigwait(&info->mask,&sig); This is doable but the patch is wrong, after sigwaitinfo "err" is the signal number, so you should replace memcpy(buffer, &err, sizeof(err)); further down with memcpy(buffer, &sig, sizeof(sig)); Paolo
diff --git a/compatfd.c b/compatfd.c index a7cebc4..5f7f355 100644 --- a/compatfd.c +++ b/compatfd.c @@ -33,9 +33,9 @@ static void *sigwait_compat(void *opaque) sigprocmask(SIG_BLOCK, &all, NULL); do { - siginfo_t siginfo; + int sig; - err = sigwaitinfo(&info->mask, &siginfo); + err = sigwait(&info->mask, &sig); if (err == -1 && errno == EINTR) { err = 0; continue;
Fix compilation failure on Darwin. Signed-off-by: Tristan Gingold <gingold@adacore.com> --- compatfd.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)