Commit 29a30806 authored by Sergei Trofimovich's avatar Sergei Trofimovich
Browse files

re-isearch: fix `gcc-13` build

Without the change the build fails in `master` as
https://hydra.nixos.org/build/250983051:

    ../src/mmap.cxx:29:19: error: 'SIZE_MAX' was not declared in this scope
       29 | # define MMAP_MAX SIZE_MAX/4L
          |                   ^~~~~~~~
parent ad87500e
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -11,6 +11,11 @@ stdenv.mkDerivation rec {
    sha256 = "sha256-D0PDqlWzIOHqdS2MlNzR2T5cyhiLcFlf30v6eFokoRQ=";
  };

  postPatch = ''
    # Fix gcc-13 build due to missing <cstdint> include.
    sed -e '1i #include <cstdint>' -i src/mmap.cxx
  '';

  buildinputs = [
    db
    file # libmagic
@@ -25,7 +30,7 @@ stdenv.mkDerivation rec {
  preBuild = ''
    cd build
    makeFlagsArray+=(
      EXTRA_INC="-I${db.dev}/include -I${file}/include"
      EXTRA_INC="-I${db.dev}/include -I${lib.getDev file}/include"
      LD_PATH="-L../lib -L${db.out}/lib -L${file}/lib -L${libnsl}/lib"
    )
  '';