Fix __sun macro check (John Levon)

This commit is contained in:
Daniel P. Berrange 2008-12-17 21:31:51 +00:00
parent e5fc0aad31
commit 0604e9efe0
4 changed files with 11 additions and 5 deletions

View File

@ -1,3 +1,9 @@
Wed Dec 17 21:30:39 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
Fix conditional checks for Solaris platform (John Levon)
* src/xen_internal.c, src/xen_unified.c, src/xs_internal.c:
s/__sun__/__sun/
Wed Dec 17 21:17:39 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
Fix Xen sub-drivers' 'open' method return type (John Levon)

View File

@ -76,7 +76,7 @@ typedef struct v1_hypercall_struct
#define XEN_V1_IOCTL_HYPERCALL_CMD \
_IOC(_IOC_NONE, 'P', 0, sizeof(v1_hypercall_t))
typedef v1_hypercall_t hypercall_t;
#elif defined(__sun__)
#elif defined(__sun)
typedef privcmd_hypercall_t hypercall_t;
#else
#error "unsupported platform"
@ -663,7 +663,7 @@ typedef struct xen_op_v2_dom xen_op_v2_dom;
#define XEN_HYPERVISOR_SOCKET "/proc/xen/privcmd"
#define HYPERVISOR_CAPABILITIES "/sys/hypervisor/properties/capabilities"
#define CPUINFO "/proc/cpuinfo"
#elif defined(__sun__)
#elif defined(__sun)
#define XEN_HYPERVISOR_SOCKET "/dev/xen/privcmd"
#define HYPERVISOR_CAPABILITIES ""
#define CPUINFO "/dev/cpu/self/cpuid"
@ -1906,7 +1906,7 @@ xenHypervisorInit(void)
goto detect_v2;
}
#ifndef __sun__
#ifndef __sun
/*
* check if the old hypercall are actually working
*/

View File

@ -213,7 +213,7 @@ xenUnifiedProbe (void)
if (virFileExists("/proc/xen"))
return 1;
#endif
#ifdef __sun__
#ifdef __sun
FILE *fh;
if (fh = fopen("/dev/xen/domcaps", "r")) {

View File

@ -39,7 +39,7 @@
#ifdef __linux__
#define XEN_HYPERVISOR_SOCKET "/proc/xen/privcmd"
#elif defined(__sun__)
#elif defined(__sun)
#define XEN_HYPERVISOR_SOCKET "/dev/xen/privcmd"
#else
#error "unsupported platform"