[vlc-commits] lua: io: fix build with recent lua

Francois Cartegnie git at videolan.org
Mon Apr 16 12:11:54 CEST 2018


vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Apr 10 06:13:08 2018 +0200| [f9a395ad502f7f1c5824a0a08e2c834d3c1aae07] | committer: Hugo Beauzée-Luyssen

lua: io: fix build with recent lua

Fix #20294
(cherry picked from commit 0151a4fd9fc47df8454072f1443f92a717ca7c9b)
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=f9a395ad502f7f1c5824a0a08e2c834d3c1aae07
---

 modules/lua/libs/io.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/modules/lua/libs/io.c b/modules/lua/libs/io.c
index 52ac91c752..d92ae445fd 100644
--- a/modules/lua/libs/io.c
+++ b/modules/lua/libs/io.c
@@ -34,6 +34,11 @@
 #include "../vlc.h"
 #include "../libs.h"
 
+#ifndef LUA_NUMBER_SCAN
+  /* Lua 5.3 only provides str<>long macros */
+  #define LUA_NUMBER_SCAN "%lf"
+#endif
+
 static int vlclua_io_file_read_line( lua_State *L, FILE* p_file )
 {
     char* psz_line = NULL;



More information about the vlc-commits mailing list