Package: csh Version: 20110502-2.1 Severity: important Tags: patch upstream
Dear Maintainer, glibc 2.24 has removed the deprecated BSD union wait type if favor of the POSIX.1 interface using W* macros from <sys/wait.h> (such as WEXITSTATUS). glibc 2.24 is already available in experimental and will plan to upload it to sid in the next days/weeks. This will cause csh to fail to build from source. You will find attached a patch to fix the issue. It unconditionally uses the "new" interface, but it should be available on all recent UNIXes including the BSDs given POSIX.1 dates back from 1988. The GNU libc has it since at least 1995, probably even earlier. Please also note that this will not break the existing binaries, just building the package from source. Thanks, Aurelien -- System Information: Debian Release: stretch/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.6.0-1-amd64 (SMP w/4 CPU cores) Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
--- csh-20110502.orig/proc.c +++ csh-20110502/proc.c @@ -81,13 +81,13 @@ pchild(int notused) int pid; extern int insource; int save_errno = errno; - union wait w; + int w; int jobflags; struct rusage ru; loop: errno = 0; /* reset, just in case */ - pid = wait3(&w.w_status, + pid = wait3(&w, (setintr && (intty || insource) ? WNOHANG | WUNTRACED : WNOHANG), &ru); if (pid <= 0) { @@ -109,7 +109,7 @@ found: pp->p_flags &= ~(PRUNNING | PSTOPPED | PREPORTED); if (WIFSTOPPED(w)) { pp->p_flags |= PSTOPPED; - pp->p_reason = w.w_stopsig; + pp->p_reason = WSTOPSIG(w); } else { if (pp->p_flags & (PTIME | PPTIME) || adrof(STRtime)) @@ -117,16 +117,16 @@ found: pp->p_rusage = ru; if (WIFSIGNALED(w)) { - if (w.w_termsig == SIGINT) + if (WTERMSIG(w) == SIGINT) pp->p_flags |= PINTERRUPTED; else pp->p_flags |= PSIGNALED; - if (w.w_coredump) + if (WCOREDUMP(w)) pp->p_flags |= PDUMPED; - pp->p_reason = w.w_termsig; + pp->p_reason = WTERMSIG(w); } else { - pp->p_reason = w.w_retcode; + pp->p_reason = WEXITSTATUS(w); if (pp->p_reason != 0) pp->p_flags |= PAEXITED; else