* Jan Kiszka (jan.kis...@siemens.com) wrote:
> pthread_setname_np was introduced with 2.12.
> 
> Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

Reviewed-by: Dr. David Alan Gilbert <dgilb...@redhat.com>

I'll polish a configure/separate function as suggested by Peter;
let's get the simple fix in quickly though to unbreak people
while I do that.

Dave

> ---
>  util/qemu-thread-posix.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/util/qemu-thread-posix.c b/util/qemu-thread-posix.c
> index 45113b4..960d7f5 100644
> --- a/util/qemu-thread-posix.c
> +++ b/util/qemu-thread-posix.c
> @@ -420,7 +420,7 @@ void qemu_thread_create(QemuThread *thread, const char 
> *name,
>      if (err)
>          error_exit(err, __func__);
>  
> -#ifdef _GNU_SOURCE
> +#if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && 
> __GLIBC_MINOR__ >= 12))
>      if (name_threads) {
>          pthread_setname_np(thread->thread, name);
>      }
> -- 
> 1.8.1.1.298.ge7eed54
> 
--
Dr. David Alan Gilbert / dgilb...@redhat.com / Manchester, UK

Reply via email to