]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Avoid clash of base64 symbols
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 2 Aug 2012 13:21:00 +0000 (14:21 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 2 Aug 2012 13:22:47 +0000 (14:22 +0100)
On Debian/Ubuntu, one of the libraries libvirt (indirectly) links
with exports a symbol named 'base64_encode'. This takes precedence
over GNULIB's base64_encode function during linking. Unfortunately
they of course have different API semantics. To avoid this problem
use a few #defines in config.h to rename the GNULIB provided
function to have a 'libvirt_gl_' prefix

configure.ac

index 6b189dbad0bc9d9cca7818051b4235c49e6854fa..04584998ee3036d8040fa1894988de0e2731acc8 100644 (file)
@@ -2876,6 +2876,11 @@ test "x$lv_cv_static_analysis" = xyes && t=1
 AC_DEFINE_UNQUOTED([STATIC_ANALYSIS], [$t],
   [Define to 1 when performing static analysis.])
 
+# Some GNULIB base64 symbols clash with a kerberos library
+AC_DEFINE_UNQUOTED([isbase64],[libvirt_gl_isbase64],[Hack to avoid symbol clash])
+AC_DEFINE_UNQUOTED([base64_encode],[libvirt_gl_base64_encode],[Hack to avoid symbol clash])
+AC_DEFINE_UNQUOTED([base64_encode_alloc],[libvirt_gl_base64_encode_alloc],[Hack to avoid symbol clash])
+
 AC_OUTPUT(Makefile src/Makefile include/Makefile docs/Makefile \
          docs/schemas/Makefile \
          gnulib/lib/Makefile \