Fixed dlerror() check to use strstr().

This commit is contained in:
Andreas Mohr 2000-12-05 04:00:54 +00:00 committed by Alexandre Julliard
parent f5a8ecc910
commit 5f48ff3cf8
1 changed files with 2 additions and 4 deletions

View File

@ -46,11 +46,9 @@ void *BUILTIN32_dlopen( const char *name )
if (!(handle = wine_dll_load( name ))) if (!(handle = wine_dll_load( name )))
{ {
LPSTR pErr, p; LPSTR pErr;
pErr = dlerror(); pErr = dlerror();
p = strchr(pErr, ':'); if (strstr(pErr, "undefined symbol")) /* undef symbol -> ERR() */
if ((p) &&
(!strncmp(p, ": undefined symbol", 18))) /* undef symbol -> ERR() */
ERR("failed to load %s: %s\n", name, pErr); ERR("failed to load %s: %s\n", name, pErr);
else /* WARN() for libraries that are supposed to be native */ else /* WARN() for libraries that are supposed to be native */
WARN("failed to load %s: %s\n", name, pErr ); WARN("failed to load %s: %s\n", name, pErr );