diff options
| -rw-r--r-- | meta/recipes-support/libpcre/files/fix-pcre-name-collision.patch | 40 | ||||
| -rw-r--r-- | meta/recipes-support/libpcre/libpcre_8.10.bb | 5 |
2 files changed, 43 insertions, 2 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 | |||
| 2 | This patch address a namespace collision with libc. | ||
| 3 | |||
| 4 | Although there is no "#include <regex.h>" in the source file, at | ||
| 5 | runtime, it's unintentionally linked to the libc version, the regcomp of | ||
| 6 | libc is called instead the pcre one using pcre's data structure... | ||
| 7 | that looks like a disaster. | ||
| 8 | |||
| 9 | Can patch is from Debian (and Ubuntu 11.04alpha has it also). | ||
| 10 | |||
| 11 | [sgw: added patch comment] | ||
| 12 | Signed-off-by: Qing He <qing.he@intel.com> | ||
| 13 | Signed-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 */ | ||
diff --git a/meta/recipes-support/libpcre/libpcre_8.10.bb b/meta/recipes-support/libpcre/libpcre_8.10.bb index db89c89e26..2e174933ca 100644 --- a/meta/recipes-support/libpcre/libpcre_8.10.bb +++ b/meta/recipes-support/libpcre/libpcre_8.10.bb | |||
| @@ -5,11 +5,12 @@ provides a POSIX calling interface to PCRE; the regular expressions \ | |||
| 5 | themselves still follow Perl syntax and semantics. The header file for \ | 5 | themselves still follow Perl syntax and semantics. The header file for \ |
| 6 | the POSIX-style functions is called pcreposix.h." | 6 | the POSIX-style functions is called pcreposix.h." |
| 7 | SECTION = "devel" | 7 | SECTION = "devel" |
| 8 | PR = "r4" | 8 | PR = "r6" |
| 9 | LICENSE = "BSD" | 9 | LICENSE = "BSD" |
| 10 | LIC_FILES_CHKSUM = "file://LICENCE;md5=77f9b14fe707d0376d89bc162e6c54ff" | 10 | LIC_FILES_CHKSUM = "file://LICENCE;md5=77f9b14fe707d0376d89bc162e6c54ff" |
| 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/pcre/pcre-${PV}.tar.bz2 \ | 11 | SRC_URI = "${SOURCEFORGE_MIRROR}/pcre/pcre-${PV}.tar.bz2 \ |
| 12 | file://pcre-cross.patch;patch=1" | 12 | file://pcre-cross.patch;patch=1 \ |
| 13 | file://fix-pcre-name-collision.patch" | ||
| 13 | 14 | ||
| 14 | SRC_URI[md5sum] = "780867a700e9d4e4b9cb47aa5453e4b2" | 15 | SRC_URI[md5sum] = "780867a700e9d4e4b9cb47aa5453e4b2" |
| 15 | SRC_URI[sha256sum] = "7ac4e016f6bad8c7d990e6de9bce58c04ff5dd8838be0c5ada0afad1d6a07480" | 16 | SRC_URI[sha256sum] = "7ac4e016f6bad8c7d990e6de9bce58c04ff5dd8838be0c5ada0afad1d6a07480" |
