bakaid commented on a change in pull request #687: MINIFICPP-1092 - Make CoAP 
compile and work on Windows
URL: https://github.com/apache/nifi-minifi-cpp/pull/687#discussion_r369082262
 
 

 ##########
 File path: extensions/coap/COAPLoader.cpp
 ##########
 @@ -18,7 +18,28 @@
 #include "core/FlowConfiguration.h"
 #include "COAPLoader.h"
 
+#ifdef WIN32
+#include <winsock2.h>
+#endif
+
 bool COAPObjectFactory::added = 
core::FlowConfiguration::add_static_func("createCOAPFactory");
+
+bool COAPObjectFactoryInitializer::initialize() {
+#ifdef WIN32
+  static WSADATA s_wsaData;
+  int iWinSockInitResult = WSAStartup(MAKEWORD(2, 2), &s_wsaData);
 
 Review comment:
   `WSAStartup` is extremely unlikely to fail, that's why I didn't add one 
originally, but it won't hurt, so I've added it now.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to