Kaydet (Commit) c8fcdcba authored tarafından Guido van Rossum's avatar Guido van Rossum

Patch 102114, Bug 11725. On OpenBSD (but apparently not on the other

BSDs) you need a leading underscore in the dlsym() lookup name.
üst add8d863
......@@ -16,6 +16,12 @@
#endif
#endif
#ifdef __OpenBSD__
#define LEAD_UNDERSCORE "_"
#else
#define LEAD_UNDERSCORE ""
#endif
#ifndef RTLD_LAZY
#define RTLD_LAZY 1
#endif
......@@ -54,8 +60,7 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *fqname, const char *shortname,
pathname = pathbuf;
}
/* ### should there be a leading underscore for some platforms? */
sprintf(funcname, "init%.200s", shortname);
sprintf(funcname, LEAD_UNDERSCORE "init%.200s", shortname);
if (fp != NULL) {
int i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment