about summary refs log tree commit diff
path: root/pkgs/applications/office
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2024-06-08 08:35:09 +0000
committerGitHub <noreply@github.com>2024-06-08 08:35:09 +0000
commitfa8f1bd2520dae61364af6eea29bebbea170974b (patch)
tree2e1c0e6c27e7f58add2eb86022572cc72a5ec6a4 /pkgs/applications/office
parent8e687906c957df9c16162606ced28eff982db346 (diff)
parent5b15ea1e00e33223d52c3aabb821de402265b326 (diff)
Merge pull request #317981 from Ma27/homebank-clang
homebank: fix clang build
Diffstat (limited to 'pkgs/applications/office')
-rw-r--r--pkgs/applications/office/homebank/default.nix4
-rw-r--r--pkgs/applications/office/homebank/fix-clang-build.diff23
2 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/applications/office/homebank/default.nix b/pkgs/applications/office/homebank/default.nix
index 99aaa7fa3bfe6..000942ff68bdd 100644
--- a/pkgs/applications/office/homebank/default.nix
+++ b/pkgs/applications/office/homebank/default.nix
@@ -9,6 +9,10 @@ stdenv.mkDerivation rec {
     hash = "sha256-YMNf6v40GuyP7Z3ksKh13A9cFnTF9YBP9xkKbGxT3AE=";
   };
 
+  patches = [
+    ./fix-clang-build.diff
+  ];
+
   nativeBuildInputs = [ pkg-config wrapGAppsHook3 intltool ];
   buildInputs = [ gtk libofx libsoup_3 gnome.adwaita-icon-theme];
 
diff --git a/pkgs/applications/office/homebank/fix-clang-build.diff b/pkgs/applications/office/homebank/fix-clang-build.diff
new file mode 100644
index 0000000000000..1b8c7fd359e23
--- /dev/null
+++ b/pkgs/applications/office/homebank/fix-clang-build.diff
@@ -0,0 +1,23 @@
+C Standard says in 6.8.1:
+
+    labeled-statement:
+      identifier : statement
+      case constant-expression : statement
+      default : statement
+
+Notably, only expressions and no declarations are allowed. A common workaround for this
+is adding an empty statement.
+
+diff --git a/src/rep-budget.c b/src/rep-budget.c
+index eb5cce6..61e2e77 100644
+--- a/src/rep-budget.c
++++ b/src/rep-budget.c
+@@ -255,7 +255,7 @@ gint tmpmode;
+ 	}
+ 	else
+ 	{
+-libname:
++libname: ;
+ 	gchar *name;
+ 	
+ 		gtk_tree_model_get(model, iter,