Skip to content

Commit

Permalink
kakasi: avoid an implicit declaration of exit.
Browse files Browse the repository at this point in the history
This caused the following false alarm:

```
error: can not use EUC-JP or UTF-8 encoding on iconv
```

See https://git.launchpad.net/ubuntu/+source/kakasi/commit/?h=applied/ubuntu/plucky&id=08f53a5.
  • Loading branch information
paveloom committed Dec 28, 2024
1 parent 00b60f5 commit 5876d9e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pkgs/by-name/ka/kakasi/avoid-an-implicit-declaration-of-exit.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/configure b/configure
index b4bd9ef..0e0df9d 100755
--- a/configure
+++ b/configure
@@ -12557,7 +12557,7 @@ else
int
main ()
{
-if (iconv_open("EUC-JP", "UTF-8") == -1) exit(1);
+if (iconv_open("EUC-JP", "UTF-8") == -1) return 1;
;
return 0;
}
2 changes: 2 additions & 0 deletions pkgs/by-name/ka/kakasi/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ stdenv.mkDerivation rec {
sha256 = "1qry3xqb83pjgxp3my8b1sy77z4f0893h73ldrvdaky70cdppr9f";
};

patches = [ ./avoid-an-implicit-declaration-of-exit.patch ];

postPatch = ''
for a in tests/kakasi-* ; do
substituteInPlace $a \
Expand Down

0 comments on commit 5876d9e

Please sign in to comment.