kirkwood: disable the bogus CONFIG_IP_ADVANCED_ROUTER override (#19722)
[openwrt/openwrt.git] / toolchain / musl / patches / 001-git-2015-03-28.patch
1 diff --git a/arch/aarch64/bits/alltypes.h.in b/arch/aarch64/bits/alltypes.h.in
2 index 99f1654..d56abda 100644
3 --- a/arch/aarch64/bits/alltypes.h.in
4 +++ b/arch/aarch64/bits/alltypes.h.in
5 @@ -16,6 +16,8 @@ TYPEDEF unsigned int nlink_t;
6 TYPEDEF float float_t;
7 TYPEDEF double double_t;
8
9 +TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
10 +
11 TYPEDEF long time_t;
12 TYPEDEF long suseconds_t;
13
14 diff --git a/include/float.h b/include/float.h
15 index c6429d3..713aadb 100644
16 --- a/include/float.h
17 +++ b/include/float.h
18 @@ -1,6 +1,10 @@
19 #ifndef _FLOAT_H
20 #define _FLOAT_H
21
22 +#ifdef __cplusplus
23 +extern "C" {
24 +#endif
25 +
26 int __flt_rounds(void);
27 #define FLT_ROUNDS (__flt_rounds())
28
29 @@ -41,4 +45,8 @@ int __flt_rounds(void);
30
31 #include <bits/float.h>
32
33 +#ifdef __cplusplus
34 +}
35 +#endif
36 +
37 #endif
38 diff --git a/src/network/inet_pton.c b/src/network/inet_pton.c
39 index 4496b47..d36c368 100644
40 --- a/src/network/inet_pton.c
41 +++ b/src/network/inet_pton.c
42 @@ -39,14 +39,15 @@ int inet_pton(int af, const char *restrict s, void *restrict a0)
43 for (i=0; ; i++) {
44 if (s[0]==':' && brk<0) {
45 brk=i;
46 - ip[i]=0;
47 + ip[i&7]=0;
48 if (!*++s) break;
49 + if (i==7) return 0;
50 continue;
51 }
52 for (v=j=0; j<4 && (d=hexval(s[j]))>=0; j++)
53 v=16*v+d;
54 if (j==0) return 0;
55 - ip[i] = v;
56 + ip[i&7] = v;
57 if (!s[j] && (brk>=0 || i==7)) break;
58 if (i==7) return 0;
59 if (s[j]!=':') {
60 diff --git a/src/regex/regcomp.c b/src/regex/regcomp.c
61 index 4cdaa1e..978dd87 100644
62 --- a/src/regex/regcomp.c
63 +++ b/src/regex/regcomp.c
64 @@ -839,7 +839,7 @@ static reg_errcode_t parse_atom(tre_parse_ctx_t *ctx, const char *s)
65 s--;
66 break;
67 default:
68 - if (isdigit(*s)) {
69 + if (!ere && (unsigned)*s-'1' < 9) {
70 /* back reference */
71 int val = *s - '0';
72 node = tre_ast_new_literal(ctx->mem, BACKREF, val, ctx->position);
73 @@ -847,7 +847,7 @@ static reg_errcode_t parse_atom(tre_parse_ctx_t *ctx, const char *s)
74 } else {
75 /* extension: accept unknown escaped char
76 as a literal */
77 - node = tre_ast_new_literal(ctx->mem, *s, *s, ctx->position);
78 + goto parse_literal;
79 }
80 ctx->position++;
81 }
82 @@ -1700,6 +1700,11 @@ tre_copy_ast(tre_mem_t mem, tre_stack_t *stack, tre_ast_node_t *ast,
83 *result = tre_ast_new_literal(mem, min, max, pos);
84 if (*result == NULL)
85 status = REG_ESPACE;
86 + else {
87 + tre_literal_t *p = (*result)->obj;
88 + p->class = lit->class;
89 + p->neg_classes = lit->neg_classes;
90 + }
91
92 if (pos > *max_pos)
93 *max_pos = pos;