[libvirt] [PATCH] build: don't export avahi syms when unused

Eric Blake eblake at redhat.com
Mon Jul 30 23:31:20 UTC 2012


Detected when building --without-avahi.

* src/libvirt_private.syms (virnetservermdns.h): Move...
* src/libvirt_avahi.syms: ...to new file.
* src/Makefile.am (USED_SYM_FILES, EXTRA_DIST): Use it.
---

I'm debating whether to push this under the build-breaker rule.
Unfortunately, while this solved my build on an Ubuntu machine,
I have other machines which are failing for other symbols (some
SASL related, and one for xenLinuxDomainBlockStats), so it's
probably better to fix everything instead of just half the problem.

 src/Makefile.am          |  7 ++++++-
 src/libvirt_avahi.syms   | 13 +++++++++++++
 src/libvirt_private.syms | 13 -------------
 3 files changed, 19 insertions(+), 14 deletions(-)
 create mode 100644 src/libvirt_avahi.syms

diff --git a/src/Makefile.am b/src/Makefile.am
index da3d0cd..98bad3d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1344,6 +1344,10 @@ if HAVE_SASL
 USED_SYM_FILES += libvirt_sasl.syms
 endif

+if HAVE_AVAHI
+USED_SYM_FILES += libvirt_avahi.syms
+endif
+
 EXTRA_DIST += \
   libvirt_public.syms		\
   libvirt_private.syms		\
@@ -1357,7 +1361,8 @@ EXTRA_DIST += \
   libvirt_qemu.syms		\
   libvirt_sasl.syms		\
   libvirt_vmx.syms		\
-  libvirt_xenxs.syms
+  libvirt_xenxs.syms		\
+  libvirt_avahi.syms

 GENERATED_SYM_FILES = libvirt.syms libvirt.def libvirt_qemu.def

diff --git a/src/libvirt_avahi.syms b/src/libvirt_avahi.syms
new file mode 100644
index 0000000..9bfed41
--- /dev/null
+++ b/src/libvirt_avahi.syms
@@ -0,0 +1,13 @@
+# Conditional on HAVE_AVAHI
+
+# virnetservermdns.h
+virNetServerMDNSAddEntry;
+virNetServerMDNSAddGroup;
+virNetServerMDNSEntryFree;
+virNetServerMDNSFree;
+virNetServerMDNSGroupFree;
+virNetServerMDNSNew;
+virNetServerMDNSRemoveEntry;
+virNetServerMDNSRemoveGroup;
+virNetServerMDNSStart;
+virNetServerMDNSStop;
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 83ca99f..71341a2 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -1541,19 +1541,6 @@ virNetServerClientStartKeepAlive;
 virNetServerClientWantClose;


-# virnetservermdns.h
-virNetServerMDNSAddEntry;
-virNetServerMDNSAddGroup;
-virNetServerMDNSEntryFree;
-virNetServerMDNSFree;
-virNetServerMDNSGroupFree;
-virNetServerMDNSNew;
-virNetServerMDNSRemoveEntry;
-virNetServerMDNSRemoveGroup;
-virNetServerMDNSStart;
-virNetServerMDNSStop;
-
-
 # virnetserverprogram.h
 virNetServerProgramDispatch;
 virNetServerProgramFree;
-- 
1.7.11.2




More information about the libvir-list mailing list