mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-16 15:40:42 +01:00
Fix compilation issues on macOS/Darwin systems and enhance cross-platform compatibility for BSD variants: - Add Darwin-specific pthread_setname_np call in tcpsrv.c with enhanced platform-specific conditional compilation - macOS (__APPLE__): Single parameter, returns int - FreeBSD/NetBSD: Two parameters, returns void - Linux/glibc (default): Two parameters, returns int This prevents compilation failures across all BSD systems where the function signature and return type differ, while maintaining existing compatibility with macOS and Linux systems. - Add _PATH_UTMP fallback definition in omusrmsg.c for systems without paths.h or missing _PATH_UTMP definition - Remove trailing empty line in cfsysline.c for consistency The change adds proper platform-specific conditional compilation with clear documentation for each variant and maintains error checking where the return value is available. Impact: Fixes build regressions on Darwin and BSD systems while preserving backward compatibility with existing platforms. Refs: https://github.com/rsyslog/rsyslog/pull/6069 Refs: https://github.com/rsyslog/rsyslog/pull/5635 Refs: https://github.com/Homebrew/homebrew-core/issues/221869 Refs: https://github.com/Homebrew/homebrew-core/issues/226378