@@ -58,6 +58,16 @@ in stdenv.mkDerivation rec {
5858 # if we dynamically link the lib, we get these errors:
5959 # https://github.com/NixOS/nixpkgs/pull/19064#issuecomment-255082684
6060 preConfigure = ''
61+ # https://issues.apache.org/jira/browse/MESOS-6616
62+ configureFlagsArray+=(
63+ "CXXFLAGS=-O2 -Wno-error=strict-aliasing"
64+ )
65+
66+ # Fix cases where makedev(),major(),minor() are referenced through
67+ # <sys/types.h> instead of <sys/sysmacros.h>
68+ sed 1i'#include <sys/sysmacros.h>' -i src/linux/fs.cpp
69+ sed 1i'#include <sys/sysmacros.h>' -i src/slave/containerizer/mesos/isolators/gpu/isolator.cpp
70+
6171 substituteInPlace 3rdparty/stout/include/stout/os/posix/chown.hpp \
6272 --subst-var-by chown ${coreutils}/bin/chown
6373