tdestroy: fix compilation for system that does have search.h but not tdestroy.
authorRémi Duraffort <ivoire@videolan.org>
Mon, 6 Dec 2010 16:51:54 +0000 (17:51 +0100)
committerRémi Duraffort <ivoire@videolan.org>
Mon, 6 Dec 2010 16:51:54 +0000 (17:51 +0100)
compat/tdestroy.c

index 04a1acb..ecd3171 100644 (file)
@@ -17,6 +17,9 @@
 # include <config.h>
 #endif
 
+// Do not implement tdestroy if that's the only missing t* function
+#ifndef HAVE_SEARCH_H
+
 #include <sys/cdefs.h>
 #include <assert.h>
 #include <stdlib.h>
@@ -44,3 +47,5 @@ tdestroy(vrootp, freefct)
   if (root != NULL)
     trecurse(root, freefct);
 }
+
+#endif