diff options
Diffstat (limited to 'toolchain-layer/recipes-devtools/gcc/gcc-4.6/305-libmudflap-susv3-legacy.patch')
-rw-r--r-- | toolchain-layer/recipes-devtools/gcc/gcc-4.6/305-libmudflap-susv3-legacy.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/toolchain-layer/recipes-devtools/gcc/gcc-4.6/305-libmudflap-susv3-legacy.patch b/toolchain-layer/recipes-devtools/gcc/gcc-4.6/305-libmudflap-susv3-legacy.patch new file mode 100644 index 000000000..8d9a4d870 --- /dev/null +++ b/toolchain-layer/recipes-devtools/gcc/gcc-4.6/305-libmudflap-susv3-legacy.patch | |||
@@ -0,0 +1,51 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | Index: gcc-4.6.0/libmudflap/mf-hooks2.c | ||
4 | =================================================================== | ||
5 | --- gcc-4.6.0.orig/libmudflap/mf-hooks2.c | ||
6 | +++ gcc-4.6.0/libmudflap/mf-hooks2.c | ||
7 | @@ -421,7 +421,7 @@ WRAPPER2(void, bzero, void *s, size_t n) | ||
8 | { | ||
9 | TRACE ("%s\n", __PRETTY_FUNCTION__); | ||
10 | MF_VALIDATE_EXTENT(s, n, __MF_CHECK_WRITE, "bzero region"); | ||
11 | - bzero (s, n); | ||
12 | + memset (s, 0, n); | ||
13 | } | ||
14 | |||
15 | |||
16 | @@ -431,7 +431,7 @@ WRAPPER2(void, bcopy, const void *src, v | ||
17 | TRACE ("%s\n", __PRETTY_FUNCTION__); | ||
18 | MF_VALIDATE_EXTENT(src, n, __MF_CHECK_READ, "bcopy src"); | ||
19 | MF_VALIDATE_EXTENT(dest, n, __MF_CHECK_WRITE, "bcopy dest"); | ||
20 | - bcopy (src, dest, n); | ||
21 | + memmove (dest, src, n); | ||
22 | } | ||
23 | |||
24 | |||
25 | @@ -441,7 +441,7 @@ WRAPPER2(int, bcmp, const void *s1, cons | ||
26 | TRACE ("%s\n", __PRETTY_FUNCTION__); | ||
27 | MF_VALIDATE_EXTENT(s1, n, __MF_CHECK_READ, "bcmp 1st arg"); | ||
28 | MF_VALIDATE_EXTENT(s2, n, __MF_CHECK_READ, "bcmp 2nd arg"); | ||
29 | - return bcmp (s1, s2, n); | ||
30 | + return n == 0 ? 0 : memcmp (s1, s2, n); | ||
31 | } | ||
32 | |||
33 | |||
34 | @@ -450,7 +450,7 @@ WRAPPER2(char *, index, const char *s, i | ||
35 | size_t n = strlen (s); | ||
36 | TRACE ("%s\n", __PRETTY_FUNCTION__); | ||
37 | MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "index region"); | ||
38 | - return index (s, c); | ||
39 | + return strchr (s, c); | ||
40 | } | ||
41 | |||
42 | |||
43 | @@ -459,7 +459,7 @@ WRAPPER2(char *, rindex, const char *s, | ||
44 | size_t n = strlen (s); | ||
45 | TRACE ("%s\n", __PRETTY_FUNCTION__); | ||
46 | MF_VALIDATE_EXTENT(s, CLAMPADD(n, 1), __MF_CHECK_READ, "rindex region"); | ||
47 | - return rindex (s, c); | ||
48 | + return strrchr (s, c); | ||
49 | } | ||
50 | |||
51 | /* XXX: stpcpy, memccpy */ | ||