aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/inetutils/inetutils-1.8/inetutils-1.8-1001-ftp-rename-ruserpass-to-avoid-C-library-collision.patch
blob: a6e366da762ca687e5f68827593f3c56f0091c74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
From 4f890adb39b52bc43c578966071625004988e3b8 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier at gentoo.org>
Date: Thu, 18 Nov 2010 22:11:48 -0500
Subject: [PATCH] ftp: rename ruserpass to avoid C library collision

The C library itself defines a "ruserpass" function.  When linking
statically, it is possible to hit a symbol collision linker error.
So rename the local ftp version to "remote_userpass".

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 ftp/extern.h    |    2 +-
 ftp/ftp.c       |    2 +-
 ftp/ruserpass.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ftp/extern.h b/ftp/extern.h
index 8cdb8aa..037cb61 100644
--- a/ftp/extern.h
+++ b/ftp/extern.h
@@ -119,7 +119,7 @@ void reset (int, char **);
 void restart (int, char **);
 void rmthelp (int, char **);
 void rmtstatus (int, char **);
-int ruserpass (char *, char **, char **, char **);
+int remote_userpass (char *, char **, char **, char **);
 void sendrequest (char *, char *, char *, int);
 void setascii (int, char **);
 void setbell (int, char **);
diff --git a/ftp/ftp.c b/ftp/ftp.c
index c20ba41..95675cc 100644
--- a/ftp/ftp.c
+++ b/ftp/ftp.c
@@ -251,7 +251,7 @@ login (char *host)
   int n, aflag = 0;
 
   user = pass = acct = 0;
-  if (ruserpass (host, &user, &pass, &acct) < 0)
+  if (remote_userpass (host, &user, &pass, &acct) < 0)
     {
       code = -1;
       return (0);
diff --git a/ftp/ruserpass.c b/ftp/ruserpass.c
index 8572b95..c08fbc0 100644
--- a/ftp/ruserpass.c
+++ b/ftp/ruserpass.c
@@ -111,7 +111,7 @@ static struct toktab
 };
 
 int
-ruserpass (char *host, char **aname, char **apass, char **aacct)
+remote_userpass (char *host, char **aname, char **apass, char **aacct)
 {
   char *hdir, buf[BUFSIZ], *tmp;
   char *myname = 0, *mydomain;
-- 
1.7.3.2