summaryrefslogtreecommitdiff
path: root/mysys/my_lib.c
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-01-15 01:34:26 +0100
committerSergei Golubchik <serg@mariadb.org>2018-01-15 15:57:04 +0100
commitd8001106c97db246b33b977c09986beea22941bb (patch)
treec5896bead5c4ac1a0ffff0a188f44722f33e2b29 /mysys/my_lib.c
parentd31ee64da68a8fee9334c7b0bcab98cb636af36f (diff)
downloadmariadb-git-d8001106c97db246b33b977c09986beea22941bb.tar.gz
MDEV-14469 build with cmake -DMYSQL_MAINTAINER_MODE=ON fails: 'readdir_r' is deprecated
1. test readdir_r() availability under -Werror 2. don't protect readdir() with mutexes, it's not needed for the way we use readdir()
Diffstat (limited to 'mysys/my_lib.c')
-rw-r--r--mysys/my_lib.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/mysys/my_lib.c b/mysys/my_lib.c
index 71969f23d85..08ff6a94823 100644
--- a/mysys/my_lib.c
+++ b/mysys/my_lib.c
@@ -103,10 +103,6 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
DBUG_ENTER("my_dir");
DBUG_PRINT("my",("path: '%s' MyFlags: %d",path,MyFlags));
-#if !defined(HAVE_READDIR_R)
- mysql_mutex_lock(&THR_LOCK_open);
-#endif
-
dirp = opendir(directory_file_name(tmp_path,(char *) path));
#if defined(__amiga__)
if ((dirp->dd_fd) < 0) /* Directory doesn't exists */
@@ -162,9 +158,6 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
}
(void) closedir(dirp);
-#if !defined(HAVE_READDIR_R)
- mysql_mutex_unlock(&THR_LOCK_open);
-#endif
result->dir_entry= (FILEINFO *)dir_entries_storage->buffer;
result->number_off_files= dir_entries_storage->elements;
@@ -174,9 +167,6 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
DBUG_RETURN(result);
error:
-#if !defined(HAVE_READDIR_R)
- mysql_mutex_unlock(&THR_LOCK_open);
-#endif
my_errno=errno;
if (dirp)
(void) closedir(dirp);