mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 10:20:11 +01: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 (cherry picked from commite874c5bf6b)
This commit is contained in:
parent
8edf13d0b4
commit
ff0b6d8662
2 changed files with 10 additions and 7 deletions
|
|
@ -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…
Add table
Reference in a new issue