about summary refs log tree commit diff
path: root/elf/tst-tlsmod1.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/tst-tlsmod1.c')
-rw-r--r--elf/tst-tlsmod1.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/elf/tst-tlsmod1.c b/elf/tst-tlsmod1.c
index 4d966c9472..c74a617b77 100644
--- a/elf/tst-tlsmod1.c
+++ b/elf/tst-tlsmod1.c
@@ -2,6 +2,7 @@
 
 #include <tls.h>
 
+#ifdef USE_TLS
 #include "tls-macros.h"
 
 
@@ -9,6 +10,7 @@
 COMMON_INT_DEF(foo);
 VAR_INT_DEF(bar);
 VAR_INT_DECL(baz);
+#endif
 
 extern int in_dso (void);
 
@@ -16,6 +18,7 @@ int
 in_dso (void)
 {
   int result = 0;
+#ifdef USE_TLS
   int *ap, *bp, *cp;
 
   /* Get variables using initial exec model.  */
@@ -59,6 +62,7 @@ in_dso (void)
       printf ("baz = %d\n", *cp);
       result = 1;
     }
+#endif
 
   return result;
 }