diff options
Diffstat (limited to 'meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch')
-rw-r--r-- | meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch b/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch new file mode 100644 index 0000000000..8fc7c4852f --- /dev/null +++ b/meta/recipes-extended/grep/grep-2.5.1a/uclibc-fix.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | # Fix to use mempcpy instead of __mempcpy. This is needed for uclibc which | ||
2 | # doesn't define __mempcpy, only mempcpy. Since both uclibc and glibc have | ||
3 | # mempcpy, we'll just use that instead. | ||
4 | # Patch source: OpenEmbedded | ||
5 | |||
6 | Index: grep-2.5.1/intl/localealias.c | ||
7 | =================================================================== | ||
8 | --- grep-2.5.1.orig/intl/localealias.c 2002-03-14 00:39:06.000000000 +1100 | ||
9 | +++ grep-2.5.1/intl/localealias.c 2007-05-17 13:53:58.000000000 +1000 | ||
10 | @@ -65,7 +65,7 @@ | ||
11 | # define strcasecmp __strcasecmp | ||
12 | |||
13 | # ifndef mempcpy | ||
14 | -# define mempcpy __mempcpy | ||
15 | +# error "mempcpy not detected" | ||
16 | # endif | ||
17 | # define HAVE_MEMPCPY 1 | ||
18 | # define HAVE___FSETLOCKING 1 | ||
19 | Index: grep-2.5.1/lib/getopt.c | ||
20 | =================================================================== | ||
21 | --- grep-2.5.1.orig/lib/getopt.c 2001-03-04 16:33:12.000000000 +1100 | ||
22 | +++ grep-2.5.1/lib/getopt.c 2007-05-17 13:51:44.000000000 +1000 | ||
23 | @@ -326,7 +326,7 @@ | ||
24 | nonoption_flags_len = nonoption_flags_max_len = 0; | ||
25 | else | ||
26 | { | ||
27 | - memset (__mempcpy (new_str, __getopt_nonoption_flags, | ||
28 | + memset (mempcpy (new_str, __getopt_nonoption_flags, | ||
29 | nonoption_flags_max_len), | ||
30 | '\0', top + 1 - nonoption_flags_max_len); | ||
31 | nonoption_flags_max_len = top + 1; | ||
32 | @@ -437,7 +437,7 @@ | ||
33 | if (__getopt_nonoption_flags == NULL) | ||
34 | nonoption_flags_max_len = -1; | ||
35 | else | ||
36 | - memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), | ||
37 | + memset (mempcpy (__getopt_nonoption_flags, orig_str, len), | ||
38 | '\0', nonoption_flags_max_len - len); | ||
39 | } | ||
40 | } | ||
41 | Index: grep-2.5.1/lib/regex.c | ||
42 | =================================================================== | ||
43 | --- grep-2.5.1.orig/lib/regex.c 2001-04-03 04:04:45.000000000 +1000 | ||
44 | +++ grep-2.5.1/lib/regex.c 2007-05-17 13:51:48.000000000 +1000 | ||
45 | @@ -7842,7 +7842,7 @@ | ||
46 | if (msg_size > errbuf_size) | ||
47 | { | ||
48 | #if defined HAVE_MEMPCPY || defined _LIBC | ||
49 | - *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; | ||
50 | + *((char *) mempcpy (errbuf, msg, errbuf_size - 1)) = '\0'; | ||
51 | #else | ||
52 | memcpy (errbuf, msg, errbuf_size - 1); | ||
53 | errbuf[errbuf_size - 1] = 0; | ||