summaryrefslogtreecommitdiff
path: root/libc/misc/elf/dl-support.c
diff options
context:
space:
mode:
authorHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>2009-12-16 13:12:00 +0100
committerHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>2009-12-17 13:42:26 +0100
commite092e7c30464555b3fb81adc8f2f479e892b0786 (patch)
tree8aed900855f09f0e93d7808339a01816d5d798a8 /libc/misc/elf/dl-support.c
parent197b2de50d7c025b6a25e7e1cde7a5667728c15c (diff)
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 <hans-christian.egtvedt@atmel.com> Acked-by: Carmelo AMOROSO <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/misc/elf/dl-support.c')
-rw-r--r--libc/misc/elf/dl-support.c6
1 files changed, 3 insertions, 3 deletions
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 <link.h>
#include <elf.h>
-#if USE_TLS
+#if defined(USE_TLS) && USE_TLS
#include <assert.h>
#include <tls.h>
#include <ldsodefs.h>
#include <string.h>
#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. */