aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xg_private.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-04-09 17:49:25 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-04-09 17:49:25 +0100
commit1386e66a6eb0203009528069869591152b882702 (patch)
tree900ce82cd0db0a3d6ab3f6db5f7bcc2108512d87 /tools/libxc/xg_private.h
parent3cb6817ad5b7dd6a7a5702d64c8c74184591df05 (diff)
downloadxen-1386e66a6eb0203009528069869591152b882702.tar.gz
xen-1386e66a6eb0203009528069869591152b882702.tar.bz2
xen-1386e66a6eb0203009528069869591152b882702.zip
libxc: Move xg_memalign() into a proper source file, so that it
definitely does not leak out of tools/libxc. Return to the ioemu/osdep.c way of checking for posix_memalign() as this works on Solaris. Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'tools/libxc/xg_private.h')
-rw-r--r--tools/libxc/xg_private.h18
1 files changed, 1 insertions, 17 deletions
diff --git a/tools/libxc/xg_private.h b/tools/libxc/xg_private.h
index 563585793a..e4dedede6d 100644
--- a/tools/libxc/xg_private.h
+++ b/tools/libxc/xg_private.h
@@ -7,7 +7,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <malloc.h>
#include <sys/mman.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -177,21 +176,6 @@ int xc_copy_to_domain_page(int xc_handle, uint32_t domid,
int pin_table(int xc_handle, unsigned int type, unsigned long mfn,
domid_t dom);
-/* Grrr portability */
-static inline void *xg_memalign(size_t alignment, size_t size)
-{
-#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 600
- int ret;
- void *ptr;
- ret = posix_memalign(&ptr, alignment, size);
- if (ret != 0)
- return NULL;
- return ptr;
-#elif defined(_BSD)
- return valloc(size);
-#else
- return memalign(alignment, size);
-#endif
-}
+void *xg_memalign(size_t alignment, size_t size);
#endif /* XG_PRIVATE_H */