diff options
| author | Kai Kang <kai.kang@windriver.com> | 2013-08-20 10:20:08 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-08-22 18:30:04 +0100 |
| commit | fef7b40aa9fcfd8f8f696b9938fa82279d05449b (patch) | |
| tree | 857dbe430b7400dbfbed0805da60a6a73195243a /meta | |
| parent | 2d4b261dd3995f9942f5741e0908891a997b5263 (diff) | |
| download | poky-fef7b40aa9fcfd8f8f696b9938fa82279d05449b.tar.gz | |
bc: add patch to fix segmentation fault
When run 'bc -l', it segmentation faults. Apply patch from BLFS to fix it.
Ref:
http://www.mail-archive.com/blfs-support@linuxfromscratch.org/msg04601.html
(From OE-Core rev: ae3158e0cfbfa1f1027976bff34ad502eeb28583)
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/recipes-extended/bc/bc_1.06.bb | 3 | ||||
| -rw-r--r-- | meta/recipes-extended/bc/files/fix-segment-fault.patch | 28 |
2 files changed, 30 insertions, 1 deletions
diff --git a/meta/recipes-extended/bc/bc_1.06.bb b/meta/recipes-extended/bc/bc_1.06.bb index fe9c3f462f..4b28fadb73 100644 --- a/meta/recipes-extended/bc/bc_1.06.bb +++ b/meta/recipes-extended/bc/bc_1.06.bb | |||
| @@ -13,7 +13,8 @@ SECTION = "base" | |||
| 13 | DEPENDS = "flex" | 13 | DEPENDS = "flex" |
| 14 | PR = "r2" | 14 | PR = "r2" |
| 15 | 15 | ||
| 16 | SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz" | 16 | SRC_URI = "${GNU_MIRROR}/bc/bc-${PV}.tar.gz \ |
| 17 | file://fix-segment-fault.patch " | ||
| 17 | 18 | ||
| 18 | SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117" | 19 | SRC_URI[md5sum] = "d44b5dddebd8a7a7309aea6c36fda117" |
| 19 | SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33" | 20 | SRC_URI[sha256sum] = "4ef6d9f17c3c0d92d8798e35666175ecd3d8efac4009d6457b5c99cea72c0e33" |
diff --git a/meta/recipes-extended/bc/files/fix-segment-fault.patch b/meta/recipes-extended/bc/files/fix-segment-fault.patch new file mode 100644 index 0000000000..20c0da2ebe --- /dev/null +++ b/meta/recipes-extended/bc/files/fix-segment-fault.patch | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | Upstream-Status: Pending | ||
| 2 | |||
| 3 | when run command such as 'echo "a = 13" | bc -l', it segmentation faults. | ||
| 4 | This patch is from http://www.mail-archive.com/blfs-support@linuxfromscratch.org/msg04602.html. | ||
| 5 | |||
| 6 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
| 7 | |||
| 8 | --- bc-1.06/lib/number.c.orig 2003-09-26 21:14:02.000000000 +0000 | ||
| 9 | +++ bc-1.06/lib/number.c 2003-09-26 21:14:26.000000000 +0000 | ||
| 10 | @@ -34,6 +34,7 @@ | ||
| 11 | #include <number.h> | ||
| 12 | #include <assert.h> | ||
| 13 | #include <stdlib.h> | ||
| 14 | +#include <string.h> | ||
| 15 | #include <ctype.h>/* Prototypes needed for external utility routines. */ | ||
| 16 | |||
| 17 | #define bc_rt_warn rt_warn | ||
| 18 | --- bc-1.06/bc/load.c.orig 2003-09-26 21:14:14.000000000 +0000 | ||
| 19 | +++ bc-1.06/bc/load.c 2003-09-26 21:14:26.000000000 +0000 | ||
| 20 | @@ -156,7 +156,7 @@ | ||
| 21 | long label_no; | ||
| 22 | long vaf_name; /* variable, array or function number. */ | ||
| 23 | long func; | ||
| 24 | - program_counter save_adr; | ||
| 25 | + static program_counter save_adr; | ||
| 26 | |||
| 27 | /* Initialize. */ | ||
| 28 | str = code; | ||
