summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-02-08 20:29:52 -0200
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2012-02-08 20:29:52 -0200
commitd005aeb7529ab690c7b7119f0ef545e2c07a1cea (patch)
tree99c0de89b0c0cd9b564f334d83a3252e040eb587
parent995627d04eb73abd689ba243c058616d4dfd3b58 (diff)
downloadkmod-d005aeb7529ab690c7b7119f0ef545e2c07a1cea.tar.gz
Check if libc has __xstat
uClibc doesn't use __xstat. Check if it exists, otherwise don't export the override function.
-rw-r--r--configure.ac2
-rw-r--r--testsuite/path.c2
2 files changed, 4 insertions, 0 deletions
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)
{