Suppress unnecessary navlib stderr output on macOS

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13562
This commit is contained in:
Jon Evans 2023-01-20 12:31:58 -05:00
parent 6586a2ca66
commit 55bf6b6773
1 changed files with 4 additions and 1 deletions

View File

@ -118,8 +118,10 @@ long NlLoadLibrary()
if( NULL == libHandle ) if( NULL == libHandle )
{ {
error = -1; // whatever error it's an error dlopen() does not set errno error = -1; // whatever error it's an error dlopen() does not set errno
#if 0
fprintf( stderr, "Error: Failed to open library \"%s\"! Error: %s!\n", TheLibrary, fprintf( stderr, "Error: Failed to open library \"%s\"! Error: %s!\n", TheLibrary,
dlerror() ); dlerror() );
#endif
} }
else else
{ {
@ -132,9 +134,10 @@ long NlLoadLibrary()
|| ( ( pfnNlGetType = (PFN_NLGETTYPE) dlsym( libHandle, cNlGetType ) ) == NULL ) ) || ( ( pfnNlGetType = (PFN_NLGETTYPE) dlsym( libHandle, cNlGetType ) ) == NULL ) )
{ {
error = -2; // whatever error it is - it's an error dlsym() does not set errno error = -2; // whatever error it is - it's an error dlsym() does not set errno
#if 0
fprintf( stderr, "Error: Failed to fetch symbols from \"%s\"! Error: %s!\n", TheLibrary, fprintf( stderr, "Error: Failed to fetch symbols from \"%s\"! Error: %s!\n", TheLibrary,
dlerror() ); dlerror() );
#endif
dlclose( libHandle ); dlclose( libHandle );
libHandle = NULL; libHandle = NULL;
} }