diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a864e1c9..fa630f327 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -728,6 +728,10 @@ set(SOURCES env/fs_remap.cc env/mock_env.cc env/unique_id_gen.cc + env/flink/env_flink.cc + env/flink/jvm_util.cc + env/flink/jni_helper.cc + env/flink/env_flink_test_suite.cc file/delete_scheduler.cc file/file_prefetch_buffer.cc file/file_util.cc @@ -1016,11 +1020,7 @@ else() port/port_posix.cc env/env_posix.cc env/fs_posix.cc - env/io_posix.cc - env/flink/env_flink.cc - env/flink/jvm_util.cc - env/flink/jni_helper.cc - env/flink/env_flink_test_suite.cc) + env/io_posix.cc) endif() if(USE_FOLLY_LITE) diff --git a/env/flink/jvm_util.cc b/env/flink/jvm_util.cc index ecd6f9677..ab5cc9663 100644 --- a/env/flink/jvm_util.cc +++ b/env/flink/jvm_util.cc @@ -18,14 +18,14 @@ #include "env/flink/jvm_util.h" -#define UNUSED(x) (void)(x) +#define UNUSED_JNI_PARAMETER(x) (void)(x) namespace ROCKSDB_NAMESPACE { std::atomic jvm_ = std::atomic(nullptr); JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved) { - UNUSED(reserved); + UNUSED_JNI_PARAMETER(reserved); JNIEnv* env = nullptr; if (vm->GetEnv((void**)&env, JNI_VERSION_1_8) != JNI_OK) { return -1; @@ -36,8 +36,8 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM* vm, void* reserved) { } JNIEXPORT void JNICALL JNI_OnUnload(JavaVM* vm, void* reserved) { - UNUSED(vm); - UNUSED(reserved); + UNUSED_JNI_PARAMETER(vm); + UNUSED_JNI_PARAMETER(reserved); jvm_.store(nullptr); } diff --git a/java/rocksjni/env_flink.cc b/java/rocksjni/env_flink.cc index f6d4b44ca..55d2edca5 100644 --- a/java/rocksjni/env_flink.cc +++ b/java/rocksjni/env_flink.cc @@ -20,8 +20,7 @@ #include -#include - +#include "include/org_rocksdb_FlinkEnv.h" #include "java/rocksjni/portal.h" #include "rocksdb/env.h"