summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS6
-rw-r--r--src/util.c6
-rw-r--r--wscript2
3 files changed, 8 insertions, 6 deletions
diff --git a/NEWS b/NEWS
index b8d90cf..52b4891 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,9 @@
+lilv (0.24.3) unstable;
+
+ * Remove use of deprecated readdir_r
+
+ -- David Robillard <d@drobilla.net> Sun, 12 Feb 2017 17:49:05 +0100
+
lilv (0.24.2) stable;
* Fix saving state to paths that contain URI delimiters (#, ?, etc)
diff --git a/src/util.c b/src/util.c
index 0c1fd5e..7d590c5 100644
--- a/src/util.c
+++ b/src/util.c
@@ -552,13 +552,9 @@ lilv_dir_for_each(const char* path,
name_max = 255; // Limit not defined, or error
}
- const size_t len = offsetof(struct dirent, d_name) + name_max + 1;
- struct dirent* entry = (struct dirent*)malloc(len);
- struct dirent* result;
- while (!readdir_r(dir, entry, &result) && result) {
+ for (struct dirent* entry; (entry = readdir(dir));) {
f(path, entry->d_name, data);
}
- free(entry);
closedir(dir);
}
#endif
diff --git a/wscript b/wscript
index 8ca6495..e2a26cf 100644
--- a/wscript
+++ b/wscript
@@ -12,7 +12,7 @@ import waflib.Logs as Logs
# major increment <=> incompatible changes
# minor increment <=> compatible changes (additions)
# micro increment <=> no interface changes
-LILV_VERSION = '0.24.2'
+LILV_VERSION = '0.24.3'
LILV_MAJOR_VERSION = '0'
# Mandatory waf variables