Check if libc has __xstat

uClibc doesn't use __xstat. Check if it exists, otherwise don't export
the override function.
This commit is contained in:
Lucas De Marchi 2012-02-08 20:29:52 -02:00
parent 995627d04e
commit d005aeb752
2 changed files with 4 additions and 0 deletions

View File

@ -30,6 +30,8 @@ AC_PROG_MKDIR_P
AC_PATH_PROG([XSLTPROC], [xsltproc])
PKG_PROG_PKG_CONFIG
AC_CHECK_FUNCS_ONCE(__xstat)
AC_ARG_WITH([rootprefix],
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
[], [with_rootprefix=""])

View File

@ -157,6 +157,7 @@ TS_EXPORT int stat(const char *path, struct stat *st)
return _stat(p, st);
}
#ifdef HAVE___XSTAT
TS_EXPORT int __xstat(int ver, const char *path, struct stat *st)
{
const char *p;
@ -175,6 +176,7 @@ TS_EXPORT int __xstat(int ver, const char *path, struct stat *st)
return _xstat(ver, p, st);
}
#endif
TS_EXPORT int access(const char *path, int mode)
{