From 69a72cac303dcb5f1154ba78ac537c3f7d1adf76 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Sat, 21 Nov 2020 18:16:06 +0100 Subject: [PATCH] solo5: patch misleading indentation --- packages/solo5/default.nix | 7 ++++++- packages/solo5/misleading-indentation.patch | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 packages/solo5/misleading-indentation.patch diff --git a/packages/solo5/default.nix b/packages/solo5/default.nix index 0971ac4..b621189 100644 --- a/packages/solo5/default.nix +++ b/packages/solo5/default.nix @@ -18,7 +18,12 @@ in stdenv.mkDerivation { enableParallelBuilding = true; - patches = [ ./genode.patch ./elftool.patch ./test_time.patch ]; + patches = [ + ./genode.patch + ./elftool.patch + ./test_time.patch + ./misleading-indentation.patch + ]; configurePhase = with stdenv; '' runHook preConfigure diff --git a/packages/solo5/misleading-indentation.patch b/packages/solo5/misleading-indentation.patch new file mode 100644 index 0000000..fbf398d --- /dev/null +++ b/packages/solo5/misleading-indentation.patch @@ -0,0 +1,15 @@ +diff --git a/bindings/genode/bindings.cc b/bindings/genode/bindings.cc +index a4a4a34..1019a39 100644 +--- a/bindings/genode/bindings.cc ++++ b/bindings/genode/bindings.cc +@@ -475,8 +475,8 @@ struct Solo5::Platform + net_acquire(const char *name, solo5_handle_t &handle, solo5_net_info &info) + { + unsigned index = ~0; +- struct mft_entry *me = mft_get_by_name(&mft, name, MFT_DEV_NET_BASIC, &index); { +- if (me != nullptr && index < MFT_MAX_ENTRIES) ++ mft_entry *me = mft_get_by_name(&mft, name, MFT_DEV_NET_BASIC, &index); ++ if (me != nullptr && index < MFT_MAX_ENTRIES) { + handle = index; + return devices[index]->net_info(info); + } -- 2.45.2