summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHolger Freyther <zecke@selfish.org>2006-04-09 13:54:13 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2006-04-09 13:54:13 +0000
commit37f0c99abc6c323b3f4d778580774e4c320b709d (patch)
tree73226567266d6a62ad4c7f37bd5c6b4177fb39d5
parent0391099e57c45e2df3c05215b06a80249c10888d (diff)
packages/flex/flex(-native):
Apply patch from the Debian patch tracker for *BSD libc based Operating systems
-rw-r--r--packages/flex/files/flex-lvalue.diff36
-rw-r--r--packages/flex/flex.inc1
2 files changed, 37 insertions, 0 deletions
diff --git a/packages/flex/files/flex-lvalue.diff b/packages/flex/files/flex-lvalue.diff
new file mode 100644
index 0000000000..56ae539a6c
--- /dev/null
+++ b/packages/flex/files/flex-lvalue.diff
@@ -0,0 +1,36 @@
+Patch from http://bugs.debian.org/cgi-bin/bugreport.cgi/flex-lvalue.diff?bug=194844;msg=10;att=1
+
+according to posix 0,1,2 are already setup and this avoids
+the issues with
+| filter.c: In function 'filter_apply_chain':
+| filter.c:161: error: invalid lvalue in assignment
+| filter.c:163: error: invalid lvalue in assignment
+| filter.c:184: error: invalid lvalue in assignment
+
+
+diff -ur flex-2.5.31.ORIG/filter.c flex-2.5.31/filter.c
+--- flex-2.5.31.ORIG/filter.c 2003-03-25 16:39:08.000000000 +0000
++++ flex-2.5.31/filter.c 2003-05-27 17:00:26.000000000 +0000
+@@ -157,11 +157,8 @@
+ if (chain->filter_func) {
+ int r;
+
+- /* setup streams again */
+- if ((stdin = fdopen (0, "r")) == NULL)
+- flexfatal (_("fdopen(0) failed"));
+- if ((stdout = fdopen (1, "w")) == NULL)
+- flexfatal (_("fdopen(1) failed"));
++ /* POSIX says we inherit fd[0-2], so we don't need
++ to do anything to them here */
+
+ if ((r = chain->filter_func (chain)) == -1)
+ flexfatal (_("filter_func failed"));
+@@ -181,8 +178,6 @@
+ if (dup2 (pipes[1], 1) == -1)
+ flexfatal (_("dup2(pipes[1],1)"));
+ close (pipes[1]);
+- if ((stdout = fdopen (1, "w")) == NULL)
+- flexfatal (_("fdopen(1) failed"));
+
+ return true;
+ }
diff --git a/packages/flex/flex.inc b/packages/flex/flex.inc
index 6e605ac9be..d6affad226 100644
--- a/packages/flex/flex.inc
+++ b/packages/flex/flex.inc
@@ -3,6 +3,7 @@ SECTION = "devel"
LICENSE = "BSD"
SRC_URI = "${SOURCEFORGE_MIRROR}/lex/flex-2.5.31.tar.bz2 \
+ file://flex-lvalue.diff;patch=1 \
file://fix-gen.patch;patch=1"
S = "${WORKDIR}/flex-${PV}"