]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Detect readdir_r with cmake on linux.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Tue, 10 May 2011 15:35:19 +0000 (11:35 -0400)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Tue, 10 May 2011 15:35:19 +0000 (11:35 -0400)
SVN-Revision: 3294

CMakeLists.txt

index 96b0ccdb011c6c16313f27e7e18844537ed12ef1..32da7259cec113b46da2ad85dd1fb11d11b5579a 100644 (file)
@@ -695,7 +695,7 @@ CHECK_FUNCTION_EXISTS(wmemcpy HAVE_WMEMCPY)
 # Make sure we have the POSIX version of readdir_r, not the
 # older 2-argument version.
 CHECK_C_SOURCE_COMPILES(
-  "#include <dirent.h>\nint main() {DIR *d; struct dirent e,*r; return readdir_r(d,&e,&r);}"
+  "#include <dirent.h>\nint main() {DIR *d = opendir(\".\"); struct dirent e,*r; return readdir_r(d,&e,&r);}"
   HAVE_READDIR_R)