This is an automated email from the ASF dual-hosted git repository.

adonisling pushed a commit to branch clucene
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git


The following commit(s) were added to refs/heads/clucene by this push:
     new ffaaa49c [chore] Fix the compilation errors on macOS (arm64) (#73)
ffaaa49c is described below

commit ffaaa49c77ec7c3a83b4be58e834c84c79fb4d1a
Author: Adonis Ling <[email protected]>
AuthorDate: Fri May 19 14:05:46 2023 +0800

    [chore] Fix the compilation errors on macOS (arm64) (#73)
---
 src/core/CLucene/index/IndexWriter.cpp | 2 +-
 src/ext/for/eliasfano.c                | 1 +
 src/ext/for/include_/eliasfano.h       | 2 ++
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/core/CLucene/index/IndexWriter.cpp 
b/src/core/CLucene/index/IndexWriter.cpp
index cdfebfa5..040e2679 100644
--- a/src/core/CLucene/index/IndexWriter.cpp
+++ b/src/core/CLucene/index/IndexWriter.cpp
@@ -39,7 +39,7 @@
 #include <assert.h>
 #include <iostream>
 
-#if defined(USE_AVX2)
+#if defined(USE_AVX2) && defined(__x86_64__)
 #define P4ENC p4nd1enc256v32
 #else
 #define P4ENC p4nd1enc128v32
diff --git a/src/ext/for/eliasfano.c b/src/ext/for/eliasfano.c
index 7c1a23a3..730d0919 100644
--- a/src/ext/for/eliasfano.c
+++ b/src/ext/for/eliasfano.c
@@ -24,6 +24,7 @@
 
 //   eliasfano.c - "Integer Compression" Elias Fano
 #ifndef USIZE
+#include <stdlib.h>
 #include <string.h>
 #include "include_/conf.h"
 #include "include_/bitpack.h"
diff --git a/src/ext/for/include_/eliasfano.h b/src/ext/for/include_/eliasfano.h
index 65c3623f..42c6c773 100644
--- a/src/ext/for/include_/eliasfano.h
+++ b/src/ext/for/include_/eliasfano.h
@@ -1,5 +1,7 @@
 //--  eliasfano.h - "Integer Compression" Elias Fano c/c++ header 
---------------------------------------------------------
 
+#include <stdint.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to