mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +00:00
util: Make some conditional symbols unconditional
Add dummy bodies for HAVE_GETPWUID_R and HAVE_MNTENT_H dependent functions for MinGW builds.
This commit is contained in:
parent
3528d66641
commit
0f7ba8c21c
@ -2585,7 +2585,46 @@ int virGetGroupID(const char *name,
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
#else /* HAVE_GETPWUID_R */
|
||||||
|
|
||||||
|
char *
|
||||||
|
virGetUserDirectory(uid_t uid ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
virUtilError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
"%s", _("virGetUserDirectory is not avialable"));
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
char *
|
||||||
|
virGetUserName(uid_t uid ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
virUtilError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
"%s", _("virGetUserName is not avialable"));
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
int virGetUserID(const char *name ATTRIBUTE_UNUSED,
|
||||||
|
uid_t *uid ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
virUtilError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
"%s", _("virGetUserID is not avialable"));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int virGetGroupID(const char *name ATTRIBUTE_UNUSED,
|
||||||
|
gid_t *gid ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
virUtilError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
"%s", _("virGetGroupID is not avialable"));
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif /* HAVE_GETPWUID_R */
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_MNTENT_H
|
#ifdef HAVE_MNTENT_H
|
||||||
@ -2619,7 +2658,18 @@ cleanup:
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
#else /* HAVE_MNTENT_H */
|
||||||
|
|
||||||
|
char *
|
||||||
|
virFileFindMountPoint(const char *type ATTRIBUTE_UNUSED)
|
||||||
|
{
|
||||||
|
errno = ENOSYS;
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* HAVE_MNTENT_H */
|
||||||
|
|
||||||
#ifndef PROXY
|
#ifndef PROXY
|
||||||
# if defined(UDEVADM) || defined(UDEVSETTLE)
|
# if defined(UDEVADM) || defined(UDEVSETTLE)
|
||||||
|
@ -247,21 +247,17 @@ char *virGetHostname(virConnectPtr conn);
|
|||||||
|
|
||||||
int virKillProcess(pid_t pid, int sig);
|
int virKillProcess(pid_t pid, int sig);
|
||||||
|
|
||||||
# ifdef HAVE_GETPWUID_R
|
|
||||||
char *virGetUserDirectory(uid_t uid);
|
char *virGetUserDirectory(uid_t uid);
|
||||||
char *virGetUserName(uid_t uid);
|
char *virGetUserName(uid_t uid);
|
||||||
int virGetUserID(const char *name,
|
int virGetUserID(const char *name,
|
||||||
uid_t *uid) ATTRIBUTE_RETURN_CHECK;
|
uid_t *uid) ATTRIBUTE_RETURN_CHECK;
|
||||||
int virGetGroupID(const char *name,
|
int virGetGroupID(const char *name,
|
||||||
gid_t *gid) ATTRIBUTE_RETURN_CHECK;
|
gid_t *gid) ATTRIBUTE_RETURN_CHECK;
|
||||||
# endif
|
|
||||||
|
|
||||||
int virRandomInitialize(unsigned int seed) ATTRIBUTE_RETURN_CHECK;
|
int virRandomInitialize(unsigned int seed) ATTRIBUTE_RETURN_CHECK;
|
||||||
int virRandom(int max);
|
int virRandom(int max);
|
||||||
|
|
||||||
# ifdef HAVE_MNTENT_H
|
|
||||||
char *virFileFindMountPoint(const char *type);
|
char *virFileFindMountPoint(const char *type);
|
||||||
# endif
|
|
||||||
|
|
||||||
void virFileWaitForDevices(void);
|
void virFileWaitForDevices(void);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user