ports/sysutils/slurm-wlm/files/patch-src_plugins_task_affinity_affinity.c
Stefan Eßer addda1277a sysutils/slurm-wlm: fix build on -CURRENT
The CPU_OR macro has been made compatible with GLIBC on -CURRENT,
the FreeBSD specific alternative is therefore no longer required.

While here pass --disable-slurmrestd to prevent the auto-configure
script from attempting to build slurmrestd if glib is found by
auto-configure (it does not build on FreeBSD due to Linux specific
headers and shell features provided by Bash but by the /bin/sh in
FreeBSD).

This port has numerous build issues when not building in a clean
jail (i.e. on a system with a previous version installed or with
other software that is detected by auto-configure).

The port revision is not bumped since these changes do not modify
the package that is generated.
2022-01-02 23:25:52 +01:00

11 lines
478 B
C

--- src/plugins/task/affinity/affinity.c.orig 2021-05-12 20:23:20 UTC
+++ src/plugins/task/affinity/affinity.c
@@ -297,7 +297,7 @@ void reset_cpuset(cpu_set_t *new_mask, cpu_set_t *cur_
if (slurm_getaffinity(1, sizeof(full_mask), &full_mask)) {
/* Try to get full CPU mask from process init */
CPU_ZERO(&full_mask);
-#ifdef __FreeBSD__
+#if defined(__FreeBSD__) && !defined(CPU_ALLOC)
CPU_OR(&full_mask, cur_mask);
#else
CPU_OR(&full_mask, &full_mask, cur_mask);