iio-oscilloscope: fix build

This commit is contained in:
Chuang Zhu
2025-02-20 19:52:50 +08:00
parent 73cf49b8ad
commit a2bf59a79f
@@ -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;"