mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 01:20:07 +01:00
systemd: define strerror() in sd-adapt header to nm_strerror_native()
Systemd uses strerror() extensively. Patch the function to use the thread-safe nm_strerror_native().
This commit is contained in:
parent
9beed4f661
commit
2b630bc22e
2 changed files with 11 additions and 0 deletions
|
|
@ -27,6 +27,11 @@
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
/* strerror() is not thread-safe. Patch systemd-sources via a define. */
|
||||
#define strerror(errsv) nm_strerror_native (errsv)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static inline NMLogLevel
|
||||
_slog_level_to_nm (int slevel)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -80,6 +80,12 @@ nm_logging_setup (const char *level,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
const char *
|
||||
nm_strerror_native (int errsv)
|
||||
{
|
||||
return g_strerror (errsv);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue