diff --git a/tests/tcg/multiarch/vma-pthread.c b/tests/tcg/multiarch/vma-pthread.c index 7045da08fc..0b8ce9751b 100644 --- a/tests/tcg/multiarch/vma-pthread.c +++ b/tests/tcg/multiarch/vma-pthread.c @@ -11,6 +11,7 @@ * pages, which are guaranteed to have the respective protection bit set. * Two mutator threads change the non-fixed protection bits randomly. */ +#define _GNU_SOURCE #include #include #include @@ -121,7 +122,7 @@ static void *thread_mutate(void *arg) unsigned int seed; int prot, ret; - seed = (unsigned int)time(NULL); + seed = (unsigned int)time(NULL) + (unsigned int)gettid(); for (i = 0; i < 10000; i++) { start_idx = rand_r(&seed) & PAGE_IDX_MASK; end_idx = rand_r(&seed) & PAGE_IDX_MASK;