systemd: use pthread instead of internal glibc functionality on non glibc platform

This commit is contained in:
Thomas Haller 2020-12-10 22:11:07 +01:00
parent 2f9238b987
commit 44e25bbb96
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -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 */
/*****************************************************************************/