diff --git a/zeromq-4.3.5.tar.gz b/zeromq-4.3.5.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..40623d750a285c72d7f18922d2fe6ec4a34c210f Binary files /dev/null and b/zeromq-4.3.5.tar.gz differ diff --git a/zeromq-configure-c99.patch b/zeromq-configure-c99.patch new file mode 100644 index 0000000000000000000000000000000000000000..0bee83b5684a1a4f97d857042d08160fce6bf283 --- /dev/null +++ b/zeromq-configure-c99.patch @@ -0,0 +1,37 @@ +Build with -D_DEFAULT_SOURCE along with -std=c11 + +On its own, -std=c11 hides POSIX and other extensions from C headers +such as when building against glibc. This causes the +posix_memalign probe to fail incorrectly with compilers that do not +accept implicit function declarations. _DEFAULT_SOURCE is ignored by +most non-GNU/Linux systems or not relevant in this context, so there +is no separate check for adding it. + +Submitted upstream: + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 68fb7251..f956f3fd 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -122,7 +122,7 @@ if (NOT MSVC) + if(NOT CMAKE_C_FLAGS MATCHES "-std=" AND NOT C_STANDARD AND NOT CMAKE_C_STANDARD) + check_c_compiler_flag("-std=c11" COMPILER_SUPPORTS_C11) + if(COMPILER_SUPPORTS_C11) +- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11") ++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_DEFAULT_SOURCE -std=c11") + else() + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99") + endif() +diff --git a/configure.ac b/configure.ac +index b9e13d4f..ffcc145b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -66,7 +66,7 @@ ZMQ_ORIG_CXXFLAGS="${CXXFLAGS:-none}" + + # Checks for programs. + AC_PROG_CC +-AX_CHECK_COMPILE_FLAG([-std=c11], [CFLAGS+=" -std=c11"], [AC_PROG_CC_C99]) ++AX_CHECK_COMPILE_FLAG([-std=c11], [CFLAGS+=" -std=c11 -D_DEFAULT_SOURCE"], [AC_PROG_CC_C99]) + AC_PROG_CXX + AX_CODE_COVERAGE + AM_PROG_CC_C_O diff --git a/zeromq.spec b/zeromq.spec index ef3b33fd64452408cced1dc42d864e011823ed19..e623b59e55610b94555255fab7751ff3a83ac240 100644 --- a/zeromq.spec +++ b/zeromq.spec @@ -1,16 +1,17 @@ -%define anolis_release 2 +%define anolis_release 1 %bcond_with pgm %bcond_with unwind Name: zeromq -Version: 4.3.4 +Version: 4.3.5 Release: %{anolis_release}%{?dist} Summary: Software library for fast, message-based applications License: LGPLv3+ URL: https://zeromq.org -Source0: https://github.com/%{name}/libzmq/archive/v%{version}/libzmq-%{version}.tar.gz +Source0: https://github.com/zeromq/libzmq/archive/v4.3.5/zeromq-4.3.5.tar.gz +Patch1: zeromq-configure-c99.patch BuildRequires: make BuildRequires: autoconf @@ -28,6 +29,9 @@ BuildRequires: libunwind-devel %if %{with pgm} BuildRequires: openpgm-devel BuildRequires: krb5-devel +BuildRequires: krb5-devel +BuildRequires: libunwind-devel +BuildRequires: openpgm-devel %endif %description @@ -98,6 +102,10 @@ autoreconf -fi %{_mandir}/man?/* %changelog +* Tue Oct 28 2025 wenyuzifang - 4.3.5-1 +- Updated to version 4.3.5 to fix xxxxxx +- Ensure POSIX functions are visible when using -std=c11 to prevent incorrect build failures on glibc systems + * Sat May 06 2023 Funda Wang - 4.3.4-2 - Generate abi files - Move man pages into devel package, they are mainly for developers