mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 14:45:24 +00:00
build: fix nodeinfo build on non-Linux platforms
Commitaaa8ab3
added new static functions that are only used on Linux; but commit22acfdc
didn't go far enough to fix compiler issues. * src/nodeinfo.c (nodeSetMemoryParameterValue) (nodeGetMemoryParameterValue): Conditionally compile based on use.
This commit is contained in:
parent
fd66ea669c
commit
35a03a6623
@ -931,6 +931,7 @@ nodeGetCPUmap(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
static int
|
static int
|
||||||
nodeSetMemoryParameterValue(const char *field,
|
nodeSetMemoryParameterValue(const char *field,
|
||||||
virTypedParameterPtr param)
|
virTypedParameterPtr param)
|
||||||
@ -964,6 +965,7 @@ cleanup:
|
|||||||
VIR_FREE(strval);
|
VIR_FREE(strval);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
nodeSetMemoryParameters(virConnectPtr conn ATTRIBUTE_UNUSED,
|
nodeSetMemoryParameters(virConnectPtr conn ATTRIBUTE_UNUSED,
|
||||||
@ -1014,6 +1016,7 @@ nodeSetMemoryParameters(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __linux__
|
||||||
static int
|
static int
|
||||||
nodeGetMemoryParameterValue(const char *field,
|
nodeGetMemoryParameterValue(const char *field,
|
||||||
void *value)
|
void *value)
|
||||||
@ -1058,6 +1061,7 @@ cleanup:
|
|||||||
VIR_FREE(buf);
|
VIR_FREE(buf);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define NODE_MEMORY_PARAMETERS_NUM 7
|
#define NODE_MEMORY_PARAMETERS_NUM 7
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user