mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-04 23:30:28 +01:00
systemd: use pthread instead of internal glibc functionality on non glibc platform
This commit is contained in:
parent
2f9238b987
commit
44e25bbb96
1 changed files with 12 additions and 0 deletions
|
|
@ -127,6 +127,7 @@ _nm_log_get_max_level_realm(void)
|
|||
|
||||
#include <sys/syscall.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#define ENABLE_GSHADOW FALSE
|
||||
|
||||
|
|
@ -202,6 +203,17 @@ typedef __compar_fn_t comparison_fn_t;
|
|||
typedef int (*__compar_d_fn_t)(const void *, const void *, void *);
|
||||
#endif
|
||||
|
||||
#ifndef __GLIBC__
|
||||
static inline int
|
||||
__register_atfork(void (*prepare)(void),
|
||||
void (*parent)(void),
|
||||
void (*child)(void),
|
||||
void *dso_handle)
|
||||
{
|
||||
return pthread_atfork(prepare, parent, child);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* (NETWORKMANAGER_COMPILATION) & NM_NETWORKMANAGER_COMPILATION_WITH_SYSTEMD */
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue