[vlc-devel] [PATCH] core: ensure an implementation of vlc_tdestroy() is always available.
Sean McGovern
gseanmcg at gmail.com
Sun Dec 20 22:20:52 CET 2015
It is considered public API, but was only exported when
tdestroy() was not available.
---
src/extras/tdestroy.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/extras/tdestroy.c b/src/extras/tdestroy.c
index ea199b8..21cef01 100644
--- a/src/extras/tdestroy.c
+++ b/src/extras/tdestroy.c
@@ -24,14 +24,15 @@
# include "config.h"
#endif
-#if defined(HAVE_SEARCH_H) && !defined(HAVE_TDESTROY)
-
#include <stdlib.h>
#include <assert.h>
#include <vlc_common.h>
+#ifdef HAVE_SEARCH_H
#include <search.h>
+#endif
+#if !defined(HAVE_TDESTROY)
static struct
{
const void **tab;
@@ -108,4 +109,10 @@ void vlc_tdestroy (void *root, void (*freenode) (void *))
free (tab);
}
+#else
+void vlc_tdestroy (void *root, void (*freenode) (void *))
+{
+ return tdestroy(root, freenode);
+}
+
#endif
--
1.7.9.2
More information about the vlc-devel
mailing list