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:
authorleper <none@none>2013-08-08 00:10:52 +0400
committerleper <none@none>2013-08-08 00:10:52 +0400
commitda779befdfd069c33946d8a037e25774ea67df14 (patch)
tree0a5a5b298b4750aa36a7cd7fd919060418b0c362
parentfc3d38a1670e9f549a1b60d8290a906b2b2b388e (diff)
Handle missing ld.so.conf gracefully instead of crashing.
-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