Commit d1936252 authored by Steve Purcell's avatar Steve Purcell
Browse files

libdevil: fix compilation on Darwin with clang

Compilation fails now that the default C++ standard is 17, because the
(rather old) upstream code uses the "register" keyword.

./../src-IL/include/il_manip.h:63:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
        register int m =   i        & 0x007fffff;
        ^~~~~~~~~

We could selectively set -std=c++14, but it also seems sufficient to
suppress the warning, so this commit chooses that option.
parent e049102f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ stdenv.mkDerivation (finalAttrs: {

  configureFlags = [ "--enable-ILU" "--enable-ILUT" ];

  CXXFLAGS = lib.optionalString stdenv.isDarwin "-Wno-register";

  preConfigure = ''
    sed -i 's, -std=gnu99,,g' configure
    sed -i 's,malloc.h,stdlib.h,g' src-ILU/ilur/ilur.c