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

github.com/windirstat/premake-4.x.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorleper <unknown>2013-08-08 00:10:52 +0400
committerleper <unknown>2013-08-08 00:10:52 +0400
commitbad33f6d05b8e93c85fe80928a14ee9914fa6d31 (patch)
tree0a5a5b298b4750aa36a7cd7fd919060418b0c362 /src
parent99a23c9fccb0ce71a752289ffc20aaf27e217dfa (diff)
Handle missing ld.so.conf gracefully instead of crashing.
Diffstat (limited to 'src')
-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..ac71334 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 fiel = 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