From b5aa33863635123ef253d072366ba51e8ef6be2a8164c886aa9800e41e8a1f86 Mon Sep 17 00:00:00 2001 From: Callum Farmer Date: Thu, 7 Dec 2023 17:01:21 +0000 Subject: [PATCH] Accepting request 1131639 from home:Andreas_Schwab:Factory - execresult.patch: Inspect errno only after failure OBS-URL: https://build.opensuse.org/request/show/1131639 OBS-URL: https://build.opensuse.org/package/show/devel:languages:lua/lua54?expand=0&rev=90 --- execresult.patch | 15 +++++++++++++++ lua54.changes | 5 +++++ lua54.spec | 2 ++ 3 files changed, 22 insertions(+) create mode 100644 execresult.patch diff --git a/execresult.patch b/execresult.patch new file mode 100644 index 0000000..85da4a8 --- /dev/null +++ b/execresult.patch @@ -0,0 +1,15 @@ +Inspect errno only after failure + +Index: lua-5.4.6/src/lauxlib.c +=================================================================== +--- lua-5.4.6.orig/src/lauxlib.c ++++ lua-5.4.6/src/lauxlib.c +@@ -283,7 +283,7 @@ LUALIB_API int luaL_fileresult (lua_Stat + + + LUALIB_API int luaL_execresult (lua_State *L, int stat) { +- if (stat != 0 && errno != 0) /* error with an 'errno'? */ ++ if (stat == -1) /* error with an 'errno'? */ + return luaL_fileresult(L, 0, NULL); + else { + const char *what = "exit"; /* type of termination */ diff --git a/lua54.changes b/lua54.changes index c1cc414..5794ae6 100644 --- a/lua54.changes +++ b/lua54.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Dec 7 15:03:40 UTC 2023 - Andreas Schwab + +- execresult.patch: Inspect errno only after failure + ------------------------------------------------------------------- Tue Nov 14 15:10:19 UTC 2023 - Matej Cepl diff --git a/lua54.spec b/lua54.spec index 75275b0..42a8be5 100644 --- a/lua54.spec +++ b/lua54.spec @@ -46,6 +46,8 @@ Patch6: shared_link.patch # PATCH-FIX-UPSTREAM skip-tests_big-endian.patch bsc#1216930 mcepl@suse.com # patch out little-endian-only test Patch7: skip-tests_big-endian.patch +# PATCH-FIX-UPSTREAM inspect errno only after failure +Patch8: execresult.patch Requires(post): update-alternatives Requires(postun):update-alternatives Provides: lua = %{version}