]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
Check if libc has __xstat
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Wed, 8 Feb 2012 22:29:52 +0000 (20:29 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Wed, 8 Feb 2012 22:29:52 +0000 (20:29 -0200)
uClibc doesn't use __xstat. Check if it exists, otherwise don't export
the override function.

configure.ac
testsuite/path.c

index f4bfe788d5ddc889c2675381961306bf3bfb6113..ce823d3d0182086ad8836bfe4902b09d28cfdd2b 100644 (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=""])
index 75dbf7c05d53382ecb27dc1191c9e58a03401adb..86025dce96439e0d01a988cce545a92104897595 100644 (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)
 {