From d005aeb7529ab690c7b7119f0ef545e2c07a1cea Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Wed, 8 Feb 2012 20:29:52 -0200 Subject: Check if libc has __xstat uClibc doesn't use __xstat. Check if it exists, otherwise don't export the override function. --- configure.ac | 2 ++ testsuite/path.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/configure.ac b/configure.ac index f4bfe78..ce823d3 100644 --- a/configure.ac +++ b/configure.ac @@ -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=""]) diff --git a/testsuite/path.c b/testsuite/path.c index 75dbf7c..86025dc 100644 --- a/testsuite/path.c +++ b/testsuite/path.c @@ -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) { -- cgit v1.2.1