X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/blobdiff_plain/798619b91c91405f847b0e48137239f218a4cf15..59f0d218a6ff34c80cf898f6d7ac62555ba8eb11:/packages/unrar/no_getpass.patch diff --git a/packages/unrar/no_getpass.patch b/packages/unrar/no_getpass.patch new file mode 100644 index 00000000..dfd956ff --- /dev/null +++ b/packages/unrar/no_getpass.patch @@ -0,0 +1,24 @@ +diff -u -r ../unrar/consio.cpp ./consio.cpp +--- ../unrar/consio.cpp 2013-12-01 09:10:14.000000000 +0100 ++++ ./consio.cpp 2014-02-13 00:27:45.000000000 +0100 +@@ -144,6 +144,20 @@ + + + #ifndef SILENT ++#ifdef __ANDROID__ ++static char* getpass(const char* prompt) { ++ static char chars[128]; ++ int len = 0; ++ while (true) { ++ char c = fgetc(stdin); ++ if (c == '\r' || c == '\n' || c == 0) break; ++ chars[len++] = c; ++ if (len == sizeof(chars)-1) break; ++ } ++ chars[len] = 0; ++ return chars; ++} ++#endif + static void GetPasswordText(wchar *Str,uint MaxLength) + { + if (MaxLength==0)