summaryrefslogtreecommitdiff
path: root/elf/tst-tls3.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/tst-tls3.c')
-rw-r--r--elf/tst-tls3.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/elf/tst-tls3.c b/elf/tst-tls3.c
index c5e501eb4e..84be43575b 100644
--- a/elf/tst-tls3.c
+++ b/elf/tst-tls3.c
@@ -3,13 +3,15 @@
#include <tls.h>
-#include "tls-macros.h"
+#ifdef USE_TLS
+# include "tls-macros.h"
/* One define int variable, two externs. */
COMMON_INT_DECL(foo);
VAR_INT_DECL(bar);
VAR_INT_DEF(baz);
+#endif
extern int in_dso (void);
@@ -19,6 +21,7 @@ extern int in_dso (void);
static int
do_test (void)
{
+#ifdef USE_TLS
int result = 0;
int *ap, *bp, *cp;
@@ -64,6 +67,9 @@ do_test (void)
result |= in_dso ();
return result;
+#else
+ return 0;
+#endif
}