summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/lua/lua5.1/luaorg_2.patch
diff options
context:
space:
mode:
authorTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
committerTudor Florea <tudor.florea@enea.com>2014-10-10 03:20:04 +0200
commit1b8dfe266937a37a4c642f96ceb2347bf4c00a17 (patch)
tree0c6aab146bb3c82efd9c7846a9a4e70dcb0ec84f /meta-oe/recipes-devtools/lua/lua5.1/luaorg_2.patch
downloadmeta-openembedded-daisy-140929.tar.gz
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea <tudor.florea@enea.com>
Diffstat (limited to 'meta-oe/recipes-devtools/lua/lua5.1/luaorg_2.patch')
-rw-r--r--meta-oe/recipes-devtools/lua/lua5.1/luaorg_2.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/lua/lua5.1/luaorg_2.patch b/meta-oe/recipes-devtools/lua/lua5.1/luaorg_2.patch
new file mode 100644
index 0000000000..0c48ea2876
--- /dev/null
+++ b/meta-oe/recipes-devtools/lua/lua5.1/luaorg_2.patch
@@ -0,0 +1,44 @@
1lua.org patch 2 for lua-5.1.5.
2from http://www.lua.org/bugs.html
3
4Upstream-Status: Backport
5
6Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
7diff -Nurd lua-5.1.5/src/lzio.c lua-5.1.5/src/lzio.c
8--- lua-5.1.5/src/lzio.c 2007-12-27 15:02:25.000000000 +0200
9+++ lua-5.1.5/src/lzio.c 2013-10-25 11:32:45.773536572 +0300
10@@ -22,10 +22,14 @@
11 size_t size;
12 lua_State *L = z->L;
13 const char *buff;
14+ if (z->eoz) return EOZ;
15 lua_unlock(L);
16 buff = z->reader(L, z->data, &size);
17 lua_lock(L);
18- if (buff == NULL || size == 0) return EOZ;
19+ if (buff == NULL || size == 0) {
20+ z->eoz = 1; /* avoid calling reader function next time */
21+ return EOZ;
22+ }
23 z->n = size - 1;
24 z->p = buff;
25 return char2int(*(z->p++));
26@@ -51,6 +55,7 @@
27 z->data = data;
28 z->n = 0;
29 z->p = NULL;
30+ z->eoz = 0;
31 }
32
33
34diff -Nurd lua-5.1.5/src/lzio.h lua-5.1.5/src/lzio.h
35--- lua-5.1.5/src/lzio.h 2007-12-27 15:02:25.000000000 +0200
36+++ lua-5.1.5/src/lzio.h 2013-10-25 11:31:50.301537789 +0300
37@@ -59,6 +59,7 @@
38 lua_Reader reader;
39 void* data; /* additional data */
40 lua_State *L; /* Lua state (for reader) */
41+ int eoz; /* true if reader has no more data */
42 };
43
44