summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-4.8/305-libmudflap-susv3-legacy.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-4.8/305-libmudflap-susv3-legacy.patch')
-rw-r--r--meta/recipes-devtools/gcc/gcc-4.8/305-libmudflap-susv3-legacy.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-4.8/305-libmudflap-susv3-legacy.patch b/meta/recipes-devtools/gcc/gcc-4.8/305-libmudflap-susv3-legacy.patch
new file mode 100644
index 0000000000..10d09a7fb9
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-4.8/305-libmudflap-susv3-legacy.patch
@@ -0,0 +1,51 @@
1Upstream-Status: Inappropriate [embedded specific]
2
3Index: gcc-4_7-branch/libmudflap/mf-hooks2.c
4===================================================================
5--- gcc-4_7-branch.orig/libmudflap/mf-hooks2.c 2012-04-10 10:19:49.391337079 -0700
6+++ gcc-4_7-branch/libmudflap/mf-hooks2.c 2012-04-10 10:31:53.191372119 -0700
7@@ -424,7 +424,7 @@
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@@ -434,7 +434,7 @@
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@@ -444,7 +444,7 @@
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@@ -453,7 +453,7 @@
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@@ -462,7 +462,7 @@
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 */