diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/base/os.lua | 7 |
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
|