commit 056d9ff26b1d2ccac45da3c26a6918f182f8c559 Author: Justin Lecher Date: Sun Jul 9 15:54:20 2017 +0100 Include sysmacros.h in addition for major() & minor() Starting from glibc-2.25 [1] the macros major and minor are only available from sys/sysmacros.h. This patch uses an autoconf macro to detect the location and includes the header accordingly. 1) https://sourceware.org/ml/libc-alpha/2017-02/msg00079.html Signed-off-by: Justin Lecher diff --git a/configure.ac b/configure.ac index 44699ae095..66d4350d44 100644 --- a/configure.ac +++ b/configure.ac @@ -124,7 +124,7 @@ AC_CHECK_HEADERS(mcheck.h values.h socket.h sys/socket.h \ AC_HEADER_SYS_WAIT AC_HEADER_TIME AC_HEADER_STDC - +AC_HEADER_MAJOR dnl Checks for structures. dnl diff --git a/src/plugins/task/cgroup/task_cgroup_devices.c b/src/plugins/task/cgroup/task_cgroup_devices.c index 6a09b3d52a..63c0a11c9e 100644 --- a/src/plugins/task/cgroup/task_cgroup_devices.c +++ b/src/plugins/task/cgroup/task_cgroup_devices.c @@ -34,12 +34,20 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. \*****************************************************************************/ +#include "config.h" + #define _GNU_SOURCE #include #include #include #include #include +#ifdef MAJOR_IN_MKDEV +# include +#endif +#ifdef MAJOR_IN_SYSMACROS +# include +#endif #include "slurm/slurm.h" #include "slurm/slurm_errno.h"