Re: [PATCH] configure: Check for MSG_NOSIGNAL availability

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

 



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.

Jan

--
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]