aboutsummaryrefslogtreecommitdiff
path: root/tinycc/tests/tests2/106_versym.c
blob: dcce5089a985aeb347ffc2fc26d4db1010041b20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
#include <pthread.h>
#include <errno.h>

int
main(void)
{
  int ret;
  pthread_condattr_t attr;
  pthread_cond_t condition;

  /* This test fails if symbol versioning does not work */
  pthread_condattr_init (&attr);
  pthread_condattr_setpshared (&attr, PTHREAD_PROCESS_SHARED);
  printf ("%s\n", pthread_cond_init (&condition, &attr) ? "fail":"ok");
  pthread_condattr_destroy (&attr);
  return 0;
}