[libvirt] [PATCH 2/5] build: replace redundant header check with function check

Paolo Bonzini pbonzini at redhat.com
Thu Apr 29 07:14:03 UTC 2010


On 04/29/2010 05:41 AM, Eric Blake wrote:
> Gnulib guarantees that pthread.h exists, but for now, it is a dummy
> header with no support for most pthread_* functions.  Modify our
> use of pthread to use function checks, rather than header checks,
> to determine how much pthread support is present.

Shouldn't this be 1/5 for the sake of bisectability?

> diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
> index 1917f26..b798cdf 100644
> --- a/src/remote/remote_driver.c
> +++ b/src/remote/remote_driver.c
> @@ -9487,7 +9487,7 @@ remoteIOEventLoop(virConnectPtr conn,
>           struct remote_thread_call *tmp = priv->waitDispatch;
>           struct remote_thread_call *prev;
>           char ignore;
> -#ifdef HAVE_PTHREAD_H
> +#ifdef HAVE_PTHREAD_SIGMASK
>           sigset_t oldmask, blockedsigs;
>   #endif

If there is no pthread_sigmask but there is sigprocmask, it is correct 
to use that too.  But this should be done in gnulib though, so I suppose 
the patch is fine as is.

Paolo




More information about the libvir-list mailing list