about summary refs log tree commit diff
path: root/elf/tst-tls1.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/tst-tls1.c')
-rw-r--r--elf/tst-tls1.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/elf/tst-tls1.c b/elf/tst-tls1.c
index 3b9b10f9aa..478f5bbdcd 100644
--- a/elf/tst-tls1.c
+++ b/elf/tst-tls1.c
@@ -3,18 +3,21 @@
 
 #include <tls.h>
 
-#include "tls-macros.h"
+#ifdef USE_TLS
+# include "tls-macros.h"
 
 
 /* Two common 'int' variables in TLS.  */
 COMMON_INT_DEF(foo);
 COMMON_INT_DEF(bar);
+#endif
 
 
 #define TEST_FUNCTION do_test ()
 static int
 do_test (void)
 {
+#ifdef USE_TLS
   int result = 0;
   int *ap, *bp;
 
@@ -79,6 +82,9 @@ do_test (void)
     }
 
   return result;
+#else
+  return 0;
+#endif
 }