mirror of
https://github.com/termux-pacman/termux-packages.git
synced 2026-01-28 21:52:39 +00:00
- Fixes https://github.com/termux/termux-packages/issues/25320 - In Lua, unfortunately, **`return` statement before the end of a block is not allowed** and produces a syntax error at runtime. Placing the `return "linux"` statement at the beginnning of the function for easier rebasing of the patch is possible, but **only by placing it inside of an `if true` condition**. - https://www.lua.org/pil/4.4.html - "For syntactic reasons, a `break` or `return` can appear only as the last statement of a block"
14 lines
334 B
Diff
14 lines
334 B
Diff
--- a/src/luarocks/core/sysdetect.lua
|
|
+++ b/src/luarocks/core/sysdetect.lua
|
|
@@ -226,6 +226,10 @@ local function read_elf_section_headers(fd, hdr)
|
|
end
|
|
|
|
local function detect_elf_system(fd, hdr, sections)
|
|
+ if true then
|
|
+ return "linux"
|
|
+ end
|
|
+
|
|
local system = e_osabi[hdr.osabi]
|
|
local endian = endians[hdr.endian]
|
|
|