Unverified Commit acc4d1e4 authored by Aleksana's avatar Aleksana Committed by GitHub
Browse files

iio-oscilloscope: fix build (#383636)

parents a38bfdeb a2bf59a7
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
  lib,
  stdenv,
  fetchFromGitHub,
  fetchpatch,
  cmake,
  pkg-config,
  wrapGAppsHook3,
@@ -31,6 +32,14 @@ stdenv.mkDerivation (finalAttrs: {
    hash = "sha256-wCeOLAkrytrBaXzUbNu8z2Ayz44M+b+mbyaRoWHpZYU=";
  };

  patches = [
    # make sure the sizeof argument to calloc is the second argument.
    (fetchpatch {
      url = "https://github.com/analogdevicesinc/iio-oscilloscope/commit/565cade20566d50adec7be191a6dd7b21217f878.patch";
      hash = "sha256-JeRve3xtWi+EcZR+qZlek+YwAbPB56OYxkFVd8MmIb0=";
    })
  ];

  postPatch = ''
    # error: 'idx' may be used uninitialized
    substituteInPlace plugins/lidar.c --replace-fail "int i, j, idx;" "int i, j, idx = 0;"