build: portability groundwork toward a Windows/MSVC viewer

- CMakeLists.txt: fetch libzmq at the top level (zeromq/libzmq v4.3.5) before
  slsDetectorPackage, so this project controls the ZeroMQ version instead of sls's
  bundled archive. sls reuses it via its if(NOT libzmq_POPULATED) guard, so a single
  libzmq-static target is built (no duplicate-target/double-symbol clash). Verified the
  full Linux build still links (JFJochZMQ -> JFJochReceiver -> jfjoch_process).
- common/NetworkAddressConvert.cpp: guard the network includes for _WIN32
  (winsock2/ws2tcpip vs arpa/inet).
- common/ImageBuffer.cpp: use std::malloc/std::free for the non-NUMA path instead of an
  anonymous mmap (the mapping had no huge-page/mbind flags, so it was equivalent) -
  portable and removes the POSIX-only dependency. The NUMA-interleave path is unchanged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-17 08:37:21 +02:00
parent c69b5297d5
commit 39c808776f
3 changed files with 34 additions and 10 deletions
+5
View File
@@ -1,7 +1,12 @@
// SPDX-FileCopyrightText: 2024 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#else
#include <arpa/inet.h>
#endif
#include <sstream>
#include <iomanip>