From: "Daniel P. Berrange" <berrange@xxxxxxxxxx> Linking fails on FreeBSD: CCLD libvirt.la /usr/bin/ld: ./.libs/libvirt_util.a(libvirt_util_la-vircgroup.o): relocation R_X86_64_PC32 against `virCgroupPartitionEscape' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: Bad value Signed-off-by: Eric Blake <eblake@xxxxxxxxxx> --- src/util/vircgroup.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/util/vircgroup.c b/src/util/vircgroup.c index 68ec953..f9007e3 100644 --- a/src/util/vircgroup.c +++ b/src/util/vircgroup.c @@ -67,8 +67,6 @@ typedef enum { */ } virCgroupFlags; -static int virCgroupPartitionEscape(char **path); - bool virCgroupAvailable(void) { bool ret = false; @@ -95,6 +93,10 @@ bool virCgroupAvailable(void) return ret; } +#if defined HAVE_MNTENT_H && defined HAVE_GETMNTENT_R + +static int virCgroupPartitionEscape(char **path); + static bool virCgroupValidateMachineGroup(virCgroupPtr group, const char *name, @@ -149,7 +151,16 @@ virCgroupValidateMachineGroup(virCgroupPtr group, VIR_FREE(partname); return valid; } - +#else +static bool +virCgroupValidateMachineGroup(virCgroupPtr group ATTRIBUTE_UNUSED, + const char *name ATTRIBUTE_UNUSED, + const char *drivername ATTRIBUTE_UNUSED, + bool stripEmulatorSuffix ATTRIBUTE_UNUSED) +{ + return true; +} +#endif /** * virCgroupFree: -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list