Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/cxong/tinydir.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCong <congusbongus@gmail.com>2016-03-12 14:21:24 +0300
committerCong <congusbongus@gmail.com>2016-03-12 14:21:24 +0300
commit9757fbb162294d3be65561c4b89e848d90c80528 (patch)
tree03ccb6de7491d7e468f030e58a41ad58ba6df50e
parent9ab8232afece6e3600ecd9337d9d2b82b1f062bf (diff)
static/inline helper function dirent_buf_size
-rwxr-xr-xtinydir.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/tinydir.h b/tinydir.h
index cc8c875..00ea1d2 100755
--- a/tinydir.h
+++ b/tinydir.h
@@ -89,7 +89,8 @@ extern "C" {
* If you use autoconf, include fpathconf and dirfd in your *
* AC_CHECK_FUNCS list. Otherwise use some other method to detect *
* and use them where available. */
-static size_t dirent_buf_size(DIR *dirp)
+_TINYDIR_FUNC
+size_t _tinydir_dirent_buf_size(DIR *dirp)
{
long name_max;
size_t name_end;
@@ -223,7 +224,7 @@ int tinydir_open(tinydir_dir *dir, const char *path)
dir->has_next = 1;
#ifndef _MSC_VER
/* allocate dirent buffer for readdir_r */
- size = dirent_buf_size(dir->_d); /* conversion to int */
+ size = _tinydir_dirent_buf_size(dir->_d); /* conversion to int */
if (size == -1) return -1;
dir->_ep = (struct dirent*)_TINYDIR_MALLOC(size);
if (dir->_ep == NULL) return -1;