clucene_core_2: fix build with musl and gcc>=11 (#217146)

This commit is contained in:
Yureka 2023-02-20 08:20:52 +01:00 committed by GitHub
parent 91cfaa255c
commit ab28fd0173
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 13 deletions

View file

@ -37,6 +37,10 @@ stdenv.mkDerivation rec {
./Install-contribs-lib.patch
# From arch
./fix-missing-include-time.patch
# required for darwin and linux-musl
./pthread-include.patch
] ++ lib.optionals stdenv.isDarwin [ ./fix-darwin.patch ];
# fails with "Unable to find executable:

View file

@ -1,16 +1,3 @@
--- a/src/shared/CLucene/LuceneThreads.h
+++ b/src/shared/CLucene/LuceneThreads.h
@@ -7,6 +7,9 @@
#ifndef _LuceneThreads_h
#define _LuceneThreads_h
+#if defined(_CL_HAVE_PTHREAD)
+ #include <pthread.h>
+#endif
CL_NS_DEF(util)
class CLuceneThreadIdCompare;
--- a/src/shared/CLucene/config/repl_tchar.h
+++ b/src/shared/CLucene/config/repl_tchar.h
@@ -28,26 +28,26 @@

View file

@ -0,0 +1,14 @@
--- a/src/shared/CLucene/LuceneThreads.h
+++ b/src/shared/CLucene/LuceneThreads.h
@@ -7,6 +7,9 @@
#ifndef _LuceneThreads_h
#define _LuceneThreads_h
+#if defined(_CL_HAVE_PTHREAD)
+ #include <pthread.h>
+#endif
CL_NS_DEF(util)
class CLuceneThreadIdCompare;