From aa72804a385b69bf8f117bab4ec174f546655be9 Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Fri, 2 Mar 2018 02:29:58 +0300 Subject: Don't use readdir_r on Linux. readdir_r has been deprecated and has problems of its own[1]. glibc 2.24 marked readdir_r as deprecated and may eventually remove it. At the same time, plain readdir is thread-safe if different threads call it for different directory streams, which is fine in our case. [1]: http://man7.org/linux/man-pages/man3/readdir_r.3.html Change-Id: I15b3002d5ddc0ff1e94ade7ef3763ad07bfe2ebb Signed-off-by: Hyunjee Kim --- libs/filesystem/src/operations.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/filesystem/src/operations.cpp b/libs/filesystem/src/operations.cpp index 4114e02a1a..43453a47c5 100644 --- a/libs/filesystem/src/operations.cpp +++ b/libs/filesystem/src/operations.cpp @@ -2175,6 +2175,7 @@ namespace && defined(_POSIX_THREAD_SAFE_FUNCTIONS)\ && defined(_SC_THREAD_SAFE_FUNCTIONS)\ && (_POSIX_THREAD_SAFE_FUNCTIONS+0 >= 0)\ + && !(defined(linux) || defined(__linux) || defined(__linux__))\ && (!defined(__hpux) || defined(_REENTRANT)) \ && (!defined(_AIX) || defined(__THREAD_SAFE)) if (::sysconf(_SC_THREAD_SAFE_FUNCTIONS)>= 0) -- cgit v1.2.3