Files
buildroot/package
Alexis Lothoré e11497dacb package/php-lua: fix build with lua < 5.2
php-lua fails to build in buildroot 2025.08-rc3 on the following error:

in file included from [...]/usr/include/php/Zend/zend.h:32,
                 from [...]/usr/include/php/main/php.h:31,
                 from [...]/build/php-lua-2.0.7/lua.c:24:
[...]/build/php-lua-2.0.7/lua.c: In function ‘php_lua_write_property’:
[...]/build/php-lua-2.0.7/lua.c:247:37:
error: ‘val’ undeclared (first use in this function); did you mean
‘zval’?
  247 |         lua_pushlstring(L, ZSTR_VAL(val), ZSTR_LEN(val));
      |                                     ^~~
[...]/usr/include/php/Zend/zend_string.h:66:26:
note: in definition of macro ‘ZSTR_VAL’
   66 | #define ZSTR_VAL(zstr)  (zstr)->val
      |                          ^~~~
[...]/build/php-lua-2.0.7/lua.c:247:37:
note: each undeclared identifier is reported only once for each function
it appears in
  247 |         lua_pushlstring(L, ZSTR_VAL(val), ZSTR_LEN(val));
      |                                     ^~~
[...]/usr/include/php/Zend/zend_string.h:66:26:
note: in definition of macro ‘ZSTR_VAL’
   66 | #define ZSTR_VAL(zstr)  (zstr)->val
      |                          ^~~~
make[2]: *** [Makefile:214: lua.lo] Error 1

The issue triggers only if lua interpreter version is lower than 5.2. In
this case,  php_lua_write_property calls ZSTR_VAL on the wrong variable.

Fix php-lua build by calling ZSTR_VAL on the correct variable.

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/11271124501 (TestPhpLuaLuajit)

Suggested-by: Romain Naour <romain.naour@smile.fr>
Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com>
[Romain: add link to failing TestPhpLuaLuajit]
Signed-off-by: Romain Naour <romain.naour@smile.fr>
(cherry picked from commit a1daf153bf)
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
2025-09-18 10:22:13 +02:00
..
2025-08-06 14:57:07 +02:00
2025-08-16 23:05:24 +02:00
2025-09-04 18:10:48 +02:00
2025-07-25 23:43:04 +02:00
2025-08-24 16:14:50 +02:00
2025-08-19 17:19:14 +02:00
2025-08-03 17:40:00 +02:00
2025-08-04 22:11:23 +02:00
2025-08-29 20:45:53 +02:00
2025-08-23 18:50:11 +02:00
2025-07-30 01:24:18 +02:00
2025-08-10 17:17:05 +02:00
2025-09-03 18:17:49 +02:00
2025-08-16 22:55:10 +02:00
2025-08-21 23:20:44 +02:00
2025-08-09 16:08:51 +02:00
2025-07-29 00:54:41 +02:00
2025-08-03 17:06:10 +02:00
2025-08-28 22:15:31 +02:00
2025-07-30 01:39:45 +02:00
2025-07-20 16:37:24 +02:00
2025-08-31 16:58:49 +02:00
2025-08-09 22:51:29 +02:00
2025-07-25 19:33:09 +02:00
2025-08-07 03:02:51 +02:00
2025-08-29 19:35:34 +02:00
2025-07-24 21:28:05 +02:00
2025-09-03 19:47:24 +02:00