Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/base/os.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/base/os.lua b/src/base/os.lua
index 87255da..deff1d0 100644
--- a/src/base/os.lua
+++ b/src/base/os.lua
@@ -23,7 +23,12 @@
-- Linux ldconfig file parser to find system library locations
local first, last
local dirs = { }
- for line in io.lines(conf_file) do
+ local file = io.open(conf_file)
+ -- Handle missing ld.so.conf (BSDs) gracefully
+ if file == nil then
+ return dirs
+ end
+ for line in file:lines() do
-- ignore comments
first = line:find("#", 1, true)
if first ~= nil then