diff options
Diffstat (limited to 'meta/recipes-extended/mailx/files/0001-Don-t-reuse-weak-symbol-optopt-to-fix-FTBFS-on-mips.patch')
-rw-r--r-- | meta/recipes-extended/mailx/files/0001-Don-t-reuse-weak-symbol-optopt-to-fix-FTBFS-on-mips.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/meta/recipes-extended/mailx/files/0001-Don-t-reuse-weak-symbol-optopt-to-fix-FTBFS-on-mips.patch b/meta/recipes-extended/mailx/files/0001-Don-t-reuse-weak-symbol-optopt-to-fix-FTBFS-on-mips.patch new file mode 100644 index 0000000000..126f50539d --- /dev/null +++ b/meta/recipes-extended/mailx/files/0001-Don-t-reuse-weak-symbol-optopt-to-fix-FTBFS-on-mips.patch | |||
@@ -0,0 +1,59 @@ | |||
1 | From: Luk Claes <luk@debian.org> | ||
2 | Date: Sat, 4 Jul 2009 10:54:53 +0200 | ||
3 | Subject: Don't reuse weak symbol optopt to fix FTBFS on mips* | ||
4 | |||
5 | This patch is taken from | ||
6 | ftp://ftp.debian.org/debian/pool/main/h/heirloom-mailx/heirloom-mailx_12.5-5.debian.tar.xz | ||
7 | |||
8 | Upstream-status: Inappropriate [upstream is dead] | ||
9 | --- | ||
10 | getopt.c | 10 +++++----- | ||
11 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
12 | |||
13 | diff --git a/getopt.c b/getopt.c | ||
14 | index 83ce628..82e983c 100644 | ||
15 | --- a/getopt.c | ||
16 | +++ b/getopt.c | ||
17 | @@ -43,7 +43,7 @@ typedef int ssize_t; | ||
18 | char *optarg; | ||
19 | int optind = 1; | ||
20 | int opterr = 1; | ||
21 | -int optopt; | ||
22 | +int optoptc; | ||
23 | |||
24 | static void | ||
25 | error(const char *s, int c) | ||
26 | @@ -69,7 +69,7 @@ error(const char *s, int c) | ||
27 | *bp++ = *s++; | ||
28 | while (*msg) | ||
29 | *bp++ = *msg++; | ||
30 | - *bp++ = optopt; | ||
31 | + *bp++ = optoptc; | ||
32 | *bp++ = '\n'; | ||
33 | write(2, buf, bp - buf); | ||
34 | ac_free(buf); | ||
35 | @@ -101,13 +101,13 @@ getopt(int argc, char *const argv[], const char *optstring) | ||
36 | } | ||
37 | curp = &argv[optind][1]; | ||
38 | } | ||
39 | - optopt = curp[0] & 0377; | ||
40 | + optoptc = curp[0] & 0377; | ||
41 | while (optstring[0]) { | ||
42 | if (optstring[0] == ':') { | ||
43 | optstring++; | ||
44 | continue; | ||
45 | } | ||
46 | - if ((optstring[0] & 0377) == optopt) { | ||
47 | + if ((optstring[0] & 0377) == optoptc) { | ||
48 | if (optstring[1] == ':') { | ||
49 | if (curp[1] != '\0') { | ||
50 | optarg = (char *)&curp[1]; | ||
51 | @@ -127,7 +127,7 @@ getopt(int argc, char *const argv[], const char *optstring) | ||
52 | optind++; | ||
53 | optarg = 0; | ||
54 | } | ||
55 | - return optopt; | ||
56 | + return optoptc; | ||
57 | } | ||
58 | optstring++; | ||
59 | } | ||