[libvirt] [PATCH] configure: Check for MSG_NOSIGNAL availability

Justin Clift justin at postgresql.org
Wed Jul 20 13:16:43 UTC 2016


On 19 Jul 2016, at 15:48, Andrea Bolognani <abologna at redhat.com> wrote:
> On Tue, 2016-07-19 at 16:23 +0200, Ján Tomko wrote:
>> On Tue, Jul 19, 2016 at 04:00:25PM +0200, Andrea Bolognani wrote:
>>>  
>>> The symbol being missing has been reported as causing build
>>> failures on OS X. Check for its availability before using it.
>>> ---
>>> See https://www.redhat.com/archives/libvir-list/2016-July/msg00613.html
>>>  
>>> configure.ac          | 4 ++++
>>> src/util/virsystemd.c | 4 ++--
>>> 2 files changed, 6 insertions(+), 2 deletions(-)
>>>  
>>> diff --git a/configure.ac b/configure.ac
>>> index 2c81c95..af5d2f8 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -402,6 +402,10 @@ AC_CHECK_TYPE([struct sockpeercred],
>>>    [], [[#include <sys/socket.h>
>>>    ]])
>>>  
>>> +AC_CHECK_DECLS([MSG_NOSIGNAL],
>>> +  [], [], [[#include <sys/socket.h>
>>> +  ]])
>>> +
>>> AC_CHECK_DECLS([ETH_FLAG_TXVLAN, ETH_FLAG_NTUPLE, ETH_FLAG_RXHASH, ETH_FLAG_LRO,
>>>                  ETHTOOL_GGSO, ETHTOOL_GGRO, ETHTOOL_GFLAGS, ETHTOOL_GFEATURES],
>>>    [], [], [[#include <linux/ethtool.h>
>>> diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c
>>> index 969cd68..d2f4bfb 100644
>>> --- a/src/util/virsystemd.c
>>> +++ b/src/util/virsystemd.c
>>> @@ -482,7 +482,7 @@ int virSystemdTerminateMachine(const char *name)
>>> void
>>> virSystemdNotifyStartup(void)
>>> {
>>> -#ifdef HAVE_SYS_UN_H
>>> +#if defined(HAVE_SYS_UN_H) && defined(HAVE_MSG_NOSIGNAL)
>>  
>> What are the benefits of checking this at configure-time?
>>  
>> Seems to me we could just as well use defined(MSG_NOSIGNAL) without
>> slowing configure down even more if we aren't going to base other
>> configure-time decisions on it.
> 
> You're of course right. I'm not quite sure what I was thinking
> when I added the configure check.

Heh Heh Heh

Guessing this means there'll be a new version of the patch I need
to test? ;)

+ Justin

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi





More information about the libvir-list mailing list