mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
tests: fix virfilewrapper
If __lxstat() and __xstat() functions are not available, build fails with: CC virfilewrapper.o virfilewrapper.c:180:5: error: no previous prototype for function '__lxstat' [-Werror,-Wmissing-prototypes] int __lxstat(int ver, const char *path, struct stat *sb) ^ virfilewrapper.c:208:5: error: no previous prototype for function '__xstat' [-Werror,-Wmissing-prototypes] int __xstat(int ver, const char *path, struct stat *sb) Luckily, we already check presence of these functions in configure using AC_CHECK_FUNCS, so just don't wrap these if they're not available. Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
This commit is contained in:
parent
4082417425
commit
058bf5549f
@ -177,6 +177,7 @@ int access(const char *path, int mode)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE___LXSTAT
|
||||||
int __lxstat(int ver, const char *path, struct stat *sb)
|
int __lxstat(int ver, const char *path, struct stat *sb)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -190,6 +191,7 @@ int __lxstat(int ver, const char *path, struct stat *sb)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE___LXSTAT */
|
||||||
|
|
||||||
int lstat(const char *path, struct stat *sb)
|
int lstat(const char *path, struct stat *sb)
|
||||||
{
|
{
|
||||||
@ -205,6 +207,7 @@ int lstat(const char *path, struct stat *sb)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE___XSTAT
|
||||||
int __xstat(int ver, const char *path, struct stat *sb)
|
int __xstat(int ver, const char *path, struct stat *sb)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -218,6 +221,7 @@ int __xstat(int ver, const char *path, struct stat *sb)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
#endif /* HAVE___XSTAT */
|
||||||
|
|
||||||
int stat(const char *path, struct stat *sb)
|
int stat(const char *path, struct stat *sb)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user