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:
@@ -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
|
static inline NMLogLevel
|
||||||
_slog_level_to_nm (int slevel)
|
_slog_level_to_nm (int slevel)
|
||||||
{
|
{
|
||||||
|
@@ -80,6 +80,12 @@ nm_logging_setup (const char *level,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *
|
||||||
|
nm_strerror_native (int errsv)
|
||||||
|
{
|
||||||
|
return g_strerror (errsv);
|
||||||
|
}
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Reference in New Issue
Block a user