+#if defined(__x86_64__) || defined(__i386__)
+ // convenience hack
+ char name[MAXPATHLEN];
+ snprintf(name, sizeof(name), "%s.x86", lib);
+ lib = name;
+#endif
+
+ ret = dlopen(lib, RTLD_NOW);
+ if (ret == NULL)
+ fprintf(stderr, "dlopen: %s\n", dlerror());
+ return ret;