]> xenbits.xensource.com Git - xen.git/commitdiff
tools/libxl: Fix building against libxl for LIBXL_API_VERSION < 0x040500
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 17 Oct 2014 08:56:19 +0000 (09:56 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 27 Oct 2014 10:10:25 +0000 (10:10 +0000)
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 <andrew.cooper3@citrix.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_uuid.h

index 196b5bc3e9e8906d60a966a76edcb9624fb8739f..c5041c7065296dfa25c9dd1ad3e807990d0d6ff5 100644 (file)
@@ -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);