lordgamez commented on code in PR #2174:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2174#discussion_r3258120016


##########
cmake/KubernetesClientC.cmake:
##########
@@ -43,21 +42,23 @@ set(WEBSOCKETS_PC ${Bash_EXECUTABLE} -c "set -x &&\
         (${Patch_EXECUTABLE} -R -p1 -s -f --dry-run -i 
${WEBSOCKETS_PATCH_FILE_1} || ${Patch_EXECUTABLE} -p1 -i 
${WEBSOCKETS_PATCH_FILE_1}) &&\
         (${Patch_EXECUTABLE} -R -p1 -s -f --dry-run -i 
${WEBSOCKETS_PATCH_FILE_2} || ${Patch_EXECUTABLE} -p1 -i 
${WEBSOCKETS_PATCH_FILE_2})")
 FetchContent_Declare(websockets
-        URL             
https://github.com/warmcat/libwebsockets/archive/refs/tags/v4.3.2.tar.gz
-        URL_HASH        
SHA256=6a85a1bccf25acc7e8e5383e4934c9b32a102880d1e4c37c70b27ae2a42406e1
+        URL             
https://github.com/warmcat/libwebsockets/archive/refs/tags/v4.5.8.tar.gz
+        URL_HASH        
SHA256=b6ade658f4af3a823d0dc806ae5ef0623f0f4f5e2aeb895a0f77c4783840c30e
         PATCH_COMMAND "${WEBSOCKETS_PC}"
         SYSTEM
 )
 
 FetchContent_MakeAvailable(yaml websockets)
 
+target_compile_options(websockets PRIVATE -fPIC)

Review Comment:
   I'm not sure why was this cflag needed originally and neither @fgerlits have 
a reason why this was needed. This change was only added, because the global 
cmake flag caused issues with other libraries. I checked and the library works 
correctly without compiling it with the -fPIC flag, so I removed it in 
https://github.com/apache/nifi-minifi-cpp/pull/2174/commits/9269fbda0a0c740b99fc96fd9cb6b9494dc6232e



##########
extensions/rocksdb-repos/FlowFileRepository.cpp:
##########
@@ -151,7 +151,8 @@ void FlowFileRepository::initialize_repository() {
   const auto it = opendb->NewIterator(options);
   for (it->SeekToFirst(); it->Valid(); it->Next()) {
     utils::Identifier container_id;
-    auto eventRead = 
FlowFileRecord::DeSerialize(gsl::make_span(it->value()).as_span<const 
std::byte>(), content_repo_, container_id);
+    const auto slice = it->value();
+    auto eventRead = FlowFileRecord::DeSerialize(std::span<const 
std::byte>(reinterpret_cast<const std::byte*>(slice.data()), slice.size()), 
content_repo_, container_id);

Review Comment:
   It seems to be working, updated in 
https://github.com/apache/nifi-minifi-cpp/pull/2174/commits/9269fbda0a0c740b99fc96fd9cb6b9494dc6232e



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to