[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-inetutils] [PATCH] Add HAVE_DECL_GETPASS checks to ftp
From: |
Fredrik Fornwall |
Subject: |
[bug-inetutils] [PATCH] Add HAVE_DECL_GETPASS checks to ftp |
Date: |
Sat, 22 Oct 2016 14:36:47 +0200 |
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.
---
ftp/cmds.c | 6 ++++++
ftp/ftp.c | 3 +++
2 files changed, 9 insertions(+)
diff --git a/ftp/cmds.c b/ftp/cmds.c
index c98e968..576a562 100644
--- a/ftp/cmds.c
+++ b/ftp/cmds.c
@@ -1721,6 +1721,9 @@ shell (int argc, char **argv _GL_UNUSED_PARAMETER)
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 @@ globulize (char *cp)
void
account (int argc, char **argv)
{
+# if !HAVE_DECL_GETPASS
+ extern char *getpass ();
+# endif
char acct[50], *ap;
if (argc > 1)
diff --git a/ftp/ftp.c b/ftp/ftp.c
index ff0b86c..e270f0f 100644
--- a/ftp/ftp.c
+++ b/ftp/ftp.c
@@ -296,6 +296,9 @@ bad:
int
login (char *host)
{
+# if !HAVE_DECL_GETPASS
+ extern char *getpass ();
+# endif
char tmp[80];
char *user, *pass, *acct, *p;
int n, aflag = 0;
--
2.10.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug-inetutils] [PATCH] Add HAVE_DECL_GETPASS checks to ftp,
Fredrik Fornwall <=