ladybird/Ports/luarocks/patches/0002-Detect-SerenityOS-using-the-uname-command.patch

26 lines
765 B
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Daniel Lemos <xspager@gmail.com>
Date: Tue, 15 Mar 2022 13:48:34 -0300
Subject: [PATCH] Detect SerenityOS using the `uname` command
---
src/luarocks/core/sysdetect.lua | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/luarocks/core/sysdetect.lua b/src/luarocks/core/sysdetect.lua
index 02b8a49..b05f170 100644
--- a/src/luarocks/core/sysdetect.lua
+++ b/src/luarocks/core/sysdetect.lua
@@ -189,6 +189,11 @@ local function detect_elf_system(fd, hdr, sections)
return "linux"
end
end
+
+ local uname_s = io.popen("uname -s"):read("*l")
+ if uname_s == "SerenityOS" then
+ return "serenity"
+ end
end
return system