summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/bc/files
diff options
context:
space:
mode:
authorKai Kang <kai.kang@windriver.com>2013-08-20 10:20:08 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-08-22 18:30:04 +0100
commitfef7b40aa9fcfd8f8f696b9938fa82279d05449b (patch)
tree857dbe430b7400dbfbed0805da60a6a73195243a /meta/recipes-extended/bc/files
parent2d4b261dd3995f9942f5741e0908891a997b5263 (diff)
downloadast2050-yocto-poky-fef7b40aa9fcfd8f8f696b9938fa82279d05449b.zip
ast2050-yocto-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/recipes-extended/bc/files')
-rw-r--r--meta/recipes-extended/bc/files/fix-segment-fault.patch28
1 files changed, 28 insertions, 0 deletions
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 0000000..20c0da2
--- /dev/null
+++ b/meta/recipes-extended/bc/files/fix-segment-fault.patch
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+when run command such as 'echo "a = 13" | bc -l', it segmentation faults.
+This patch is from http://www.mail-archive.com/blfs-support@linuxfromscratch.org/msg04602.html.
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+
+--- bc-1.06/lib/number.c.orig 2003-09-26 21:14:02.000000000 +0000
++++ bc-1.06/lib/number.c 2003-09-26 21:14:26.000000000 +0000
+@@ -34,6 +34,7 @@
+ #include <number.h>
+ #include <assert.h>
+ #include <stdlib.h>
++#include <string.h>
+ #include <ctype.h>/* Prototypes needed for external utility routines. */
+
+ #define bc_rt_warn rt_warn
+--- bc-1.06/bc/load.c.orig 2003-09-26 21:14:14.000000000 +0000
++++ bc-1.06/bc/load.c 2003-09-26 21:14:26.000000000 +0000
+@@ -156,7 +156,7 @@
+ long label_no;
+ long vaf_name; /* variable, array or function number. */
+ long func;
+- program_counter save_adr;
++ static program_counter save_adr;
+
+ /* Initialize. */
+ str = code;
OpenPOWER on IntegriCloud