mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
talloc: alternatively use prama init for constructors if supported
Signed-off-by: Bjoern Jacke <bjacke@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
c32eb00610
commit
f13e1ca54a
@ -392,7 +392,13 @@ _PUBLIC_ void talloc_set_log_fn(void (*log_fn)(const char *message))
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_CONSTRUCTOR_ATTRIBUTE
|
#ifdef HAVE_CONSTRUCTOR_ATTRIBUTE
|
||||||
void talloc_lib_init(void) __attribute__((constructor));
|
#define CONSTRUCTOR __attribute__((constructor))
|
||||||
|
#elif defined(HAVE_PRAGMA_INIT)
|
||||||
|
#define CONSTRUCTOR
|
||||||
|
#pragma init (talloc_lib_init)
|
||||||
|
#endif
|
||||||
|
#if defined(HAVE_CONSTRUCTOR_ATTRIBUTE) || defined(HAVE_PRAGMA_INIT)
|
||||||
|
void talloc_lib_init(void) CONSTRUCTOR;
|
||||||
void talloc_lib_init(void)
|
void talloc_lib_init(void)
|
||||||
{
|
{
|
||||||
uint32_t random_value;
|
uint32_t random_value;
|
||||||
|
Loading…
Reference in New Issue
Block a user