gdb/testsuite/gdb.threads: Ensure TLS tests link against pthreads.
[platform/upstream/binutils.git] / gdb / testsuite / gdb.threads / tls-var-main.c
index 34a2522..afad945 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
+#include <pthread.h>
+
 int
 main (void)
 {
+  /* Ensure we link against pthreads even with --as-needed.  */
+  pthread_testcancel();
   return 0;
 }