summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libpcre/files
diff options
context:
space:
mode:
authorQing He <qing.he@intel.com>2011-03-03 19:20:25 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-03-03 23:49:06 +0000
commit763d783c6265aa6ffbb6de999becda40e3db3985 (patch)
tree2008404c69508225a89b01aeeb6bcf8795901c65 /meta/recipes-support/libpcre/files
parent05d1ac23aa952bb7bae6ddf99ee212daf71e59a7 (diff)
downloadpoky-763d783c6265aa6ffbb6de999becda40e3db3985.tar.gz
libpcre: fix the name collision with libc
fixes [YOCTO #721] [YOCTO #722] [sgw: added patch comment, bump PR, and changed BUGID -> YOCTO] (From OE-Core rev: 6a4cb991ea473a84c620b33fbb82b5ae860971a3) Signed-off-by: Qing He <qing.he@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/libpcre/files')
-rw-r--r--meta/recipes-support/libpcre/files/fix-pcre-name-collision.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-support/libpcre/files/fix-pcre-name-collision.patch b/meta/recipes-support/libpcre/files/fix-pcre-name-collision.patch
new file mode 100644
index 0000000000..6548353121
--- /dev/null
+++ b/meta/recipes-support/libpcre/files/fix-pcre-name-collision.patch
@@ -0,0 +1,40 @@
1
2This patch address a namespace collision with libc.
3
4Although there is no "#include <regex.h>" in the source file, at
5runtime, it's unintentionally linked to the libc version, the regcomp of
6libc is called instead the pcre one using pcre's data structure...
7that looks like a disaster.
8
9Can patch is from Debian (and Ubuntu 11.04alpha has it also).
10
11[sgw: added patch comment]
12Signed-off-by: Qing He <qing.he@intel.com>
13Signed-off-by: Saul Wold <sgw@linux.intel.com>
14
15--- a/pcreposix.h 2010-05-17 00:17:23.000000000 +0800
16+++ b/pcreposix.h 2009-01-15 04:32:17.000000000 +0800
17@@ -133,14 +130,19 @@
18
19 /* The functions */
20
21-PCREPOSIX_EXP_DECL int regcomp(regex_t *, const char *, int);
22-PCREPOSIX_EXP_DECL int regexec(const regex_t *, const char *, size_t,
23+PCREPOSIX_EXP_DECL int pcreposix_regcomp(regex_t *, const char *, int);
24+PCREPOSIX_EXP_DECL int pcreposix_regexec(const regex_t *, const char *, size_t,
25 regmatch_t *, int);
26-PCREPOSIX_EXP_DECL size_t regerror(int, const regex_t *, char *, size_t);
27-PCREPOSIX_EXP_DECL void regfree(regex_t *);
28+PCREPOSIX_EXP_DECL size_t pcreposix_regerror(int, const regex_t *, char *, size_t);
29+PCREPOSIX_EXP_DECL void pcreposix_regfree(regex_t *);
30
31 #ifdef __cplusplus
32 } /* extern "C" */
33 #endif
34
35+#define regcomp pcreposix_regcomp
36+#define regexec pcreposix_regexec
37+#define regerror pcreposix_regerror
38+#define regfree pcreposix_regfree
39+
40 #endif /* End of pcreposix.h */