From: Wei Liu Subject: Re: [PATCH for-4.5] tools/libxl: Fix building against libxl for LIBXL_API_VERSION < 0x040500 Date: Fri, 17 Oct 2014 11:01:44 +0100 Message-ID: <20141017100144.GB2844@zion.uk.xensource.com> References: <1413536179-21129-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1413536179-21129-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Wei Liu , Ian Jackson , Ian Campbell , Xen-devel List-Id: xen-devel@lists.xenproject.org On Fri, Oct 17, 2014 at 09:56:19AM +0100, Andrew Cooper wrote: > c/s 6276f66ebe "libxl: libxl_uuid_copy now takes a ctx argument" introduces > API compatibiltiy for libxl_uuid_copy() which sadly is not valid C. Fix it. > > Signed-off-by: Andrew Cooper > CC: Ian Campbell > CC: Ian Jackson > CC: Wei Liu Acked-by: Wei Liu > --- > tools/libxl/libxl_uuid.h | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/tools/libxl/libxl_uuid.h b/tools/libxl/libxl_uuid.h > index 196b5bc..c5041c7 100644 > --- a/tools/libxl/libxl_uuid.h > +++ b/tools/libxl/libxl_uuid.h > @@ -61,7 +61,12 @@ int libxl_uuid_from_string(libxl_uuid *uuid, const char *in); > void libxl_uuid_copy(libxl_ctx *ctx_opt, libxl_uuid *dst, > const libxl_uuid *src); > #if defined(LIBXL_API_VERSION) && LIBXL_API_VERSION < 0x040500 > -void libxl_uuid_copy(dst, src) libxl_uuid_copy(NULL, dst, src) > +void static inline libxl_uuid_copy_0x040400(libxl_uuid *dst, > + const libxl_uuid *src) > +{ > + libxl_uuid_copy(NULL, dst, src); > +} > +#define libxl_uuid_copy libxl_uuid_copy_0x040400 > #endif > > void libxl_uuid_clear(libxl_uuid *uuid); > -- > 1.7.10.4