Update to FreeBSD head 2017-08-01

Git mirror commit f5002f5e5f78cae9f0269d812dc0aedb0339312c.

Update #3472.
This commit is contained in:
Sebastian Huber
2018-08-07 14:56:50 +02:00
parent de261e0404
commit c37f9fba70
169 changed files with 6857 additions and 3262 deletions

View File

@@ -544,7 +544,7 @@ fin:
vector_sort(_nsmod, _nsmodsize, sizeof(*_nsmod), string_compare);
}
static int exiting = 0;
static void
ns_mod_free(ns_mod *mod)
@@ -555,12 +555,10 @@ ns_mod_free(ns_mod *mod)
return;
if (mod->unregister != NULL)
mod->unregister(mod->mtab, mod->mtabsize);
if (mod->handle != nss_builtin_handle)
if (mod->handle != nss_builtin_handle && !exiting)
(void)dlclose(mod->handle);
}
/*
* Cleanup
*/
@@ -569,6 +567,7 @@ nss_atexit(void)
{
int isthreaded;
exiting = 1;
isthreaded = __isthreaded;
if (isthreaded)
(void)_pthread_rwlock_wrlock(&nss_lock);
@@ -617,8 +616,6 @@ rtems_nss_register_module(const char *source, ns_mtab *mtab,
}
#endif /* __rtems__ */
/*
* Finally, the actual implementation.
*/