From: Oliver Kurth Date: Fri, 15 Sep 2017 18:23:32 +0000 (-0700) Subject: Fix building without ICU X-Git-Tag: stable-10.2.0~280 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ca594dc06fc0b129265d19c51bb367333b01358;p=thirdparty%2Fopen-vm-tools.git Fix building without ICU Building vgauth failed when building without ICU (with the --without-icu option). This was caused by not using cxx link options which are needed by xml-security, but only enabled when using ICU. Also fix the warning "invalid suffix on literal;". --- diff --git a/open-vm-tools/configure.ac b/open-vm-tools/configure.ac index cca01d401..363c76d97 100644 --- a/open-vm-tools/configure.ac +++ b/open-vm-tools/configure.ac @@ -1331,6 +1331,7 @@ AM_CONDITIONAL(HAVE_VSOCK, test "$os" = "linux") AM_CONDITIONAL(HAVE_MKDTEMP, test "$have_mkdtemp" = "yes") AM_CONDITIONAL(HAVE_UDEV, test "$have_udev" = "yes") AM_CONDITIONAL(ENABLE_RESOLUTIONKMS, test "x$enable_resolutionkms" = "xyes") +AM_CONDITIONAL(VGAUTH_USE_CXX, test "$with_icu" = "yes" -o "$use_xmlsec1" != "yes") if test "$have_xsm" != "yes"; then AC_DEFINE([NO_XSM], 1, []) diff --git a/open-vm-tools/vgauth/service/Makefile.am b/open-vm-tools/vgauth/service/Makefile.am index 8c51d9f2a..575cf3864 100644 --- a/open-vm-tools/vgauth/service/Makefile.am +++ b/open-vm-tools/vgauth/service/Makefile.am @@ -1,5 +1,5 @@ ################################################################################ -### Copyright (C) 2014-2016 VMware, Inc. All rights reserved. +### Copyright (C) 2014-2017 VMware, Inc. All rights reserved. ### ### This program is free software; you can redistribute it and/or modify ### it under the terms of version 2 of the GNU General Public License as @@ -90,7 +90,10 @@ VGAuthService_LDADD += -lcrypto if HAVE_ICU VGAuthService_LDADD += @ICU_LIBS@ - VGAuthService_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ +endif + +if VGAUTH_USE_CXX + VGAuthService_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXX) \ $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ diff --git a/open-vm-tools/vgauth/serviceImpl/saml-xml-security-c.cpp b/open-vm-tools/vgauth/serviceImpl/saml-xml-security-c.cpp index 4aa41da2a..671afcbc9 100644 --- a/open-vm-tools/vgauth/serviceImpl/saml-xml-security-c.cpp +++ b/open-vm-tools/vgauth/serviceImpl/saml-xml-security-c.cpp @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2011-2016 VMware, Inc. All rights reserved. + * Copyright (C) 2011-2017 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -549,7 +549,7 @@ SAML_VerifyBearerTokenAndChain(const char *xmlText, &subj, userNameOut, verifyAi); - Debug("%s: ServiceVerifyAndCheckTrustCertChainForSubject() returned "VGAUTHERR_FMT64"\n", __FUNCTION__, err); + Debug("%s: ServiceVerifyAndCheckTrustCertChainForSubject() returned " VGAUTHERR_FMT64 "\n", __FUNCTION__, err); for (i = 0; i < (int) certs.size(); i++) { g_free(pemCerts[i]);