From: Lucas De Marchi Date: Wed, 8 Feb 2012 22:29:52 +0000 (-0200) Subject: Check if libc has __xstat X-Git-Tag: v6~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d005aeb7529ab690c7b7119f0ef545e2c07a1cea;p=thirdparty%2Fkmod.git Check if libc has __xstat uClibc doesn't use __xstat. Check if it exists, otherwise don't export the override function. --- diff --git a/configure.ac b/configure.ac index f4bfe788..ce823d3d 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 75dbf7c0..86025dce 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) {