Skip to content

Commit

Permalink
fix cannot open libpthread.so error on kobo
Browse files Browse the repository at this point in the history
  • Loading branch information
chrox committed Oct 23, 2014
1 parent 3ff07f9 commit 8ef1113
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ffi/mupdf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,12 @@ local function get_pthread()
-- pthread directives are in the default namespace on Android
return ffi.C
else
return ffi.load("pthread")
-- Kobo devices strangely have no libpthread.so in LD_LIBRARY_PATH
-- so we hardcode the libpthread.so.0 here just for Kobo.
for _, libname in ipairs({"libpthread.so", "libpthread.so.0"}) do
local ok, pthread = pcall(ffi.load, libname)
if ok then return pthread end
end
end
end
Expand Down

0 comments on commit 8ef1113

Please sign in to comment.