mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-03 07:33:50 +00:00
build: fix virutil build on mingw
https://bugzilla.redhat.com/show_bug.cgi?id=964358 On platforms without decent group support, the build failed: Cannot export virGetGroupList: symbol not defined ./.libs/libvirt_security_manager.a(libvirt_security_manager_la-security_dac.o): In function `virSecurityDACPreFork': /home/eblake/libvirt-tmp/build/src/../../src/security/security_dac.c:248: undefined reference to `virGetGroupList' collect2: error: ld returned 1 exit status * src/util/virutil.c (virGetGroupList): Provide dummy implementation. Signed-off-by: Eric Blake <eblake@redhat.com> (cherry picked from commit cd725c7a9350c8331a6f915127cf7007706f9926)
This commit is contained in:
parent
aa11d6888f
commit
ec15df4e85
@ -2797,6 +2797,14 @@ virSetUIDGID(uid_t uid, gid_t gid, gid_t *groups ATTRIBUTE_UNUSED,
|
|||||||
|
|
||||||
#else /* ! HAVE_GETPWUID_R */
|
#else /* ! HAVE_GETPWUID_R */
|
||||||
|
|
||||||
|
int
|
||||||
|
virGetGroupList(uid_t uid ATTRIBUTE_UNUSED, gid_t gid ATTRIBUTE_UNUSED,
|
||||||
|
gid_t **list)
|
||||||
|
{
|
||||||
|
*list = NULL;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
# ifdef WIN32
|
# ifdef WIN32
|
||||||
/* These methods are adapted from GLib2 under terms of LGPLv2+ */
|
/* These methods are adapted from GLib2 under terms of LGPLv2+ */
|
||||||
static int
|
static int
|
||||||
@ -2941,6 +2949,7 @@ virGetUserRuntimeDirectory(void)
|
|||||||
{
|
{
|
||||||
return virGetUserCacheDirectory();
|
return virGetUserCacheDirectory();
|
||||||
}
|
}
|
||||||
|
|
||||||
# else /* !HAVE_GETPWUID_R && !WIN32 */
|
# else /* !HAVE_GETPWUID_R && !WIN32 */
|
||||||
char *
|
char *
|
||||||
virGetUserDirectory(void)
|
virGetUserDirectory(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user