From 19a973a85ef5a2eaf1ca59d09ec2d6e972c0cd24 Mon Sep 17 00:00:00 2001 From: Josh Haberman Date: Thu, 4 Jun 2015 13:07:43 -0700 Subject: Fixes from Google-internal. --- upb/bindings/lua/upb.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'upb/bindings/lua/upb.lua') diff --git a/upb/bindings/lua/upb.lua b/upb/bindings/lua/upb.lua index 4090b37..8b32cff 100644 --- a/upb/bindings/lua/upb.lua +++ b/upb/bindings/lua/upb.lua @@ -14,7 +14,10 @@ -- This has to happen *before* the require call, because if the module -- is loaded RTLD_LOCAL first, a subsequent load as RTLD_GLOBAL won't -- have the proper effect, at least on some platforms. -package.loadlib(package.searchpath("upb_c", package.cpath), "*") +local so = package.searchpath and package.searchpath("upb_c", package.cpath) +if so then + package.loadlib(so, "*") +end local upb = require("upb_c") -- cgit v1.2.3