mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-09-06 17:14:02 +00:00
random: Provide missing gettid() declaration
Provide missing declaration of gettid() function necessary for entropy
generation for hash table in the _rand_init_seed() function in the
src/libnm-glib-aux/nm-random-utils.c.
Fixes: 3649efe2b5
('glib-aux: put more effort into seeding GRand fallback for nm_utils_random_bytes()')
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/754
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/918
This commit is contained in:
parent
dd595c6c1d
commit
e874c5bf6b
|
@ -30,6 +30,16 @@ nm_is_ascii(char ch)
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#include <sys/syscall.h>
|
||||
static inline pid_t
|
||||
_nm_gettid(void)
|
||||
{
|
||||
return (pid_t) syscall(SYS_gettid);
|
||||
}
|
||||
#define gettid() _nm_gettid()
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
pid_t nm_utils_gettid(void);
|
||||
|
||||
gboolean _nm_assert_on_main_thread(void);
|
||||
|
|
|
@ -75,13 +75,6 @@ raw_getpid(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
static inline pid_t
|
||||
_nm_gettid(void)
|
||||
{
|
||||
return (pid_t) syscall(SYS_gettid);
|
||||
}
|
||||
#define gettid() _nm_gettid()
|
||||
|
||||
/* we build with C11 and thus <uchar.h> provides char32_t,char16_t. */
|
||||
#define HAVE_CHAR32_T 1
|
||||
#define HAVE_CHAR16_T 1
|
||||
|
|
Loading…
Reference in a new issue