1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +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:
Björn Jacke 2020-10-30 12:57:42 +01:00 committed by Andrew Bartlett
parent c32eb00610
commit f13e1ca54a

View File

@ -392,7 +392,13 @@ _PUBLIC_ void talloc_set_log_fn(void (*log_fn)(const char *message))
}
#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)
{
uint32_t random_value;