Browse Source
Without the check for HAVE_DECL_GETPASS and declaring a local function declaration the implicit int rule causes crashes on 64-bit systems without getpass(3) such as Android. Fixes #517.android-5
Fredrik Fornwall
8 years ago
2 changed files with 37 additions and 1 deletions
@ -0,0 +1,36 @@ |
|||
diff -u -r ../inetutils-1.9.4/ftp/cmds.c ./ftp/cmds.c
|
|||
--- ../inetutils-1.9.4/ftp/cmds.c 2015-06-09 03:41:47.000000000 -0400
|
|||
+++ ./ftp/cmds.c 2016-10-22 08:13:16.282265064 -0400
|
|||
@@ -1721,6 +1721,9 @@
|
|||
void |
|||
user (int argc, char **argv) |
|||
{ |
|||
+# if !HAVE_DECL_GETPASS
|
|||
+ extern char *getpass ();
|
|||
+# endif
|
|||
char acct[80]; |
|||
int n, aflag = 0; |
|||
|
|||
@@ -2070,6 +2073,9 @@
|
|||
void |
|||
account (int argc, char **argv) |
|||
{ |
|||
+# if !HAVE_DECL_GETPASS
|
|||
+ extern char *getpass ();
|
|||
+# endif
|
|||
char acct[50], *ap; |
|||
|
|||
if (argc > 1) |
|||
diff -u -r ../inetutils-1.9.4/ftp/ftp.c ./ftp/ftp.c
|
|||
--- ../inetutils-1.9.4/ftp/ftp.c 2015-03-31 11:40:47.000000000 -0400
|
|||
+++ ./ftp/ftp.c 2016-10-22 08:13:37.005945253 -0400
|
|||
@@ -292,6 +292,9 @@
|
|||
int |
|||
login (char *host) |
|||
{ |
|||
+# if !HAVE_DECL_GETPASS
|
|||
+ extern char *getpass ();
|
|||
+# endif
|
|||
char tmp[80]; |
|||
char *user, *pass, *acct; |
|||
int n, aflag = 0; |
Loading…
Reference in new issue