Re: [PATCH v2] configure: Check for MSG_NOSIGNAL availability

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2016-07-20 at 14:19 +0100, Daniel P. Berrange wrote:
> On Wed, Jul 20, 2016 at 03:16:35PM +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.
> > ---
> > Changes from v1:
> > 
> >   * don't unnecessarily check for availability at configure
> >     time (thanks Ján)
> > 
> >  src/util/virsystemd.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/src/util/virsystemd.c b/src/util/virsystemd.c
> > index 969cd68..81ee538 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(MSG_NOSIGNAL)
> >      const char *path;
> >      const char *msg = "READY=1";
> >      int fd;
> > @@ -526,7 +526,7 @@ virSystemdNotifyStartup(void)
> >          VIR_WARN("Failed to notify systemd");
> >  
> >      VIR_FORCE_CLOSE(fd);
> > -#endif /* HAVE_SYS_UN_H */
> > +#endif /* defined(HAVE_SYS_UN_H) && defined(MSG_NOSIGNAL) */
> 
> IMHO it'd be nicer to just do
> 
> 
> #ifndef MSG_NOSIGNAL
> #define MSG_NOSIGNAL 0
> #endif
> 
> as it avoids creating ever more compicated conditional blocks around the
> code.

So pretty much the patch that was proposed initially, then ;)

v3 coming right up!

-- 
Andrea Bolognani / Red Hat / Virtualization

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]