<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">https://bugs.gentoo.org/862195
https://cgit.freebsd.org/ports/tree/textproc/clucene/files/patch-src__core__CLucene__index__DocumentsWriter.cpp
https://cgit.freebsd.org/ports/plain/textproc/clucene/files/patch-src__core__CLucene__util__VoidMap.h
--- a/src/core/CLucene/index/DocumentsWriter.cpp
+++ b/src/core/CLucene/index/DocumentsWriter.cpp
@@ -125,7 +125,7 @@
   if (this-&gt;postingsFreeListDW.values){
       if (this-&gt;postingsFreeCountDW &lt; this-&gt;postingsFreeListDW.length) {
           memset(this-&gt;postingsFreeListDW.values + this-&gt;postingsFreeCountDW
-              , NULL
+              , 0
               , sizeof(Posting*));
       }
       postingsFreeListDW.deleteUntilNULL();

--- a/src/core/CLucene/util/VoidMap.h
+++ b/src/core/CLucene/util/VoidMap.h
@@ -11,8 +11,13 @@
 #include "CLucene/LuceneThreads.h"
 
 #if defined(_CL_HAVE_TR1_UNORDERED_MAP) &amp;&amp; defined(_CL_HAVE_TR1_UNORDERED_SET)
+#if defined(_LIBCPP_VERSION)
+	#include &lt;unordered_map&gt;
+	#include &lt;unordered_set&gt;
+#else
 	#include &lt;tr1/unordered_map&gt;
 	#include &lt;tr1/unordered_set&gt;
+#endif
 #elif defined(_CL_HAVE_HASH_MAP) &amp;&amp; defined(_CL_HAVE_HASH_SET)
 	//hashing is all or nothing!
 	#include &lt;hash_map&gt;
@@ -83,7 +88,7 @@
 	_vt get( _kt k) const {
 		const_iterator itr = base::find(k);
 		if ( itr==base::end() )
-			return (_vt)NULL;
+			return static_cast&lt;_vt&gt;(0);
 		else
 			return itr-&gt;second;
 	}
@@ -316,6 +321,7 @@
 		if ( _this::dk || _this::dv )
 			_this::remove(k);
 
+		(*this)[k] = v;;
 	}
 };
 
</pre></body></html>