libbladeRF: fix clang build (#462059)

This commit is contained in:
Aleksana
2025-11-18 16:15:16 +00:00
committed by GitHub
2 changed files with 17 additions and 0 deletions
@@ -0,0 +1,12 @@
Fix clang build: https://github.com/Nuand/bladeRF/pull/1045.patch
--- a/host/utilities/bladeRF-cli/src/cmd/flash_image.c
+++ b/host/utilities/bladeRF-cli/src/cmd/flash_image.c
@@ -68,7 +68,7 @@ static int handle_param(const char *param, char *val,
status = CLI_RET_INVPARAM;
} else {
for (i = 0; i < len && status == 0; i++) {
- if (val[i] >= 'a' || val[i] <= 'f') {
+ if (val[i] >= 'a' && val[i] <= 'f') {
val[i] -= 'a' - 'A';
} else if (!((val[i] >= '0' && val[i] <= '9') ||
(val[i] >= 'A' && val[i] <= 'F'))) {
+5
View File
@@ -26,6 +26,11 @@ stdenv.mkDerivation rec {
fetchSubmodules = true;
};
patches = [
# fix clang build: https://github.com/Nuand/bladeRF/pull/1045
./clang-fix.patch
];
nativeBuildInputs = [
cmake
pkg-config