From f3217f9be3225c4943677d03b274cbc0cb4ed228 Mon Sep 17 00:00:00 2001 From: Hans-Christian Egtvedt Date: Wed, 16 Dec 2009 13:12:00 +0100 Subject: check if USE_TLS is defined before use This patch will convert all the #ifdef USE_TLS and #if USE_TLS to #if defined(USE_TLS) && USE_TLS. By checking if the USE_TLS is defined before checking its value will result in correct behavior for architectures not defining this config symbol. Signed-off-by: Hans-Christian Egtvedt Acked-by: Carmelo AMOROSO --- libc/misc/elf/dl-support.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libc/misc/elf/dl-support.c') diff --git a/libc/misc/elf/dl-support.c b/libc/misc/elf/dl-support.c index 3f5248128..665b62a24 100644 --- a/libc/misc/elf/dl-support.c +++ b/libc/misc/elf/dl-support.c @@ -13,14 +13,14 @@ #include #include -#if USE_TLS +#if defined(USE_TLS) && USE_TLS #include #include #include #include #endif -#if USE_TLS +#if defined(USE_TLS) && USE_TLS void (*_dl_init_static_tls) (struct link_map *) = &_dl_nothread_init_static_tls; @@ -39,7 +39,7 @@ void internal_function _dl_aux_init (ElfW(auxv_t) *av) _dl_phnum = (size_t) av[AT_PHNUM].a_un.a_val; } -#if USE_TLS +#if defined(USE_TLS) && USE_TLS /* Initialize static TLS area and DTV for current (only) thread. libpthread implementations should provide their own hook to handle all threads. */ -- cgit v1.2.3