Package: pbs-drmaa Version: 1.0.17-1 Severity: serious Tags: patch User: debian-...@lists.debian.org Usertags: kfreebsd
Hi, pbs-drmaa/job.c uses S_ISREG, which is not part of core POSIX specification; instead it should use the S_IFREG macro. This caused the FTBFS on kfreebsd. Patch is attached. Thanks! -- System Information: Debian Release: jessie/sid APT prefers unstable APT policy: (500, 'unstable'), (500, 'stable') Architecture: kfreebsd-amd64 (x86_64) Kernel: kFreeBSD 9.0-2-amd64-xenhvm-ipsec Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
From: Steven Chamberlain <ste...@pyro.eu.org> Subject: use POSIX-recommended macro to check file type --- a/pbs_drmaa/job.c +++ b/pbs_drmaa/job.c @@ -401,7 +401,7 @@ struct stat tmpstat; fsd_log_error(("Failed to open job status file: %s", status_file)); - if (stat(start_file, &tmpstat) == 0 && (tmpstat.st_mode & S_IFREG)) + if (stat(start_file, &tmpstat) == 0 && S_ISREG(tmpstat.st_mode)) { exit_status = 143; /* SIGTERM */ fsd_log_info(("But start file exist %s. Assuming that job was killed (exit_status=%d).", start_file, exit_status));