mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
libxl: expose #define to 4.5 and above
In e3abab74 (libxl: un-constify return value of libxl_basename), the
macro was exposed to releases < 4.5. However only new code is able to
make use of that macro so it should be exposed to releases >= 4.5.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
This commit is contained in:
1 parent
98d1fd8ef1
commit
bfac2d7a00
3 files changed
+5
-5
No files matched your search
+3
-3
@@ -478,13 +478,13 @@ typedef struct libxl__ctx libxl_ctx;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* LIBXL_HAVE_CONST_LIBXL_BASENAME_RETURN_VALUE
|
||||
* LIBXL_HAVE_NONCONST_LIBXL_BASENAME_RETURN_VALUE
|
||||
*
|
||||
* The return value of libxl_basename is malloc'ed but the erroneously
|
||||
* marked as "const" in releases before 4.5.
|
||||
*/
|
||||
#if defined(LIBXL_API_VERSION) && LIBXL_API_VERSION < 0x040500
|
||||
#define LIBXL_HAVE_CONST_LIBXL_BASENAME_RETURN_VALUE 1
|
||||
#if !defined(LIBXL_API_VERSION) || LIBXL_API_VERSION >= 0x040500
|
||||
#define LIBXL_HAVE_NONCONST_LIBXL_BASENAME_RETURN_VALUE 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "libxl_internal.h"
|
||||
|
||||
#ifdef LIBXL_HAVE_CONST_LIBXL_BASENAME_RETURN_VALUE
|
||||
#ifndef LIBXL_HAVE_NONCONST_LIBXL_BASENAME_RETURN_VALUE
|
||||
const
|
||||
#endif
|
||||
char *libxl_basename(const char *name)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#include "libxl.h"
|
||||
|
||||
#ifdef LIBXL_HAVE_CONST_LIBXL_BASENAME_RETURN_VALUE
|
||||
#ifndef LIBXL_HAVE_NONCONST_LIBXL_BASENAME_RETURN_VALUE
|
||||
const
|
||||
#endif
|
||||
char *libxl_basename(const char *name); /* returns string from strdup */
|
||||
|
||||