Compare commits

..

2 commits

Author SHA1 Message Date
Ben Woodard
9b04a9bbf4 disable building with libunwind to fix C++ exceptions when a C applicaion loads
a module written in C++ #2175966
2023-03-08 10:13:08 +01:00
Denis Arnaud
7f4c05e1ac Merged with main 2022-03-03 15:04:56 +01:00
3 changed files with 15 additions and 49 deletions

View file

@ -1 +1 @@
SHA512 (zeromq-4.3.5.tar.gz) = a71d48aa977ad8941c1609947d8db2679fc7a951e4cd0c3a1127ae026d883c11bd4203cf315de87f95f5031aec459a731aec34e5ce5b667b8d0559b157952541
SHA512 (libzmq-4.3.4.tar.gz) = ad828b1ab5a87983285a6b44b08240816ed1c4e2c73306ab1a851bf80df1892b5e2f92064a49fbadc1f4c75043625ace77dd25b64d5d1c2a7d1d61cc916fba0b

View file

@ -1,37 +0,0 @@
Build with -D_DEFAULT_SOURCE along with -std=c11
On its own, -std=c11 hides POSIX and other extensions from C headers
such as <stdlib.h> 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: <https://github.com/zeromq/libzmq/pull/4635>
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

View file

@ -2,16 +2,15 @@
%bcond_without unwind
Name: zeromq
Version: 4.3.5
Release: %autorelease
Version: 4.3.4
Release: 2%{?dist}
Summary: Software library for fast, message-based applications
License: MPL-2.0 AND BSD-3-Clause AND MIT
License: LGPLv3+
URL: https://zeromq.org
Source0: https://github.com/%{name}/libzmq/archive/v%{version}/%{name}-%{version}.tar.gz
Patch1: zeromq-configure-c99.patch
Source0: https://github.com/%{name}/libzmq/archive/v%{version}/libzmq-%{version}.tar.gz
BuildRequires: make
BuildRequires: make
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc-c++
@ -51,7 +50,7 @@ developing applications that use %{name}.
%prep
%autosetup -p1
%autosetup -p1 -n libzmq-%{version}
# Remove bundled code.
rm -rf external/wepoll
@ -68,7 +67,6 @@ autoreconf -fi
--with-libgssapi_krb5 \
%endif
--with-libsodium \
--enable-drafts \
%if %{with unwind}
--enable-libunwind \
%endif
@ -86,7 +84,7 @@ rm %{buildroot}%{_libdir}/libzmq.la
%check
%ifarch s390x
make check V=1 XFAIL_TESTS=tests/test_radio_dish || ( cat test-suite.log && exit 1 )
make check V=1 || ( cat test-suite.log && exit 1 )
%endif
@ -95,7 +93,7 @@ make check V=1 XFAIL_TESTS=tests/test_radio_dish || ( cat test-suite.log && exit
%files
%doc README.md AUTHORS NEWS
%license LICENSE
%license COPYING COPYING.LESSER
%{_bindir}/curve_keygen
%{_libdir}/libzmq.so.5*
%{_mandir}/man3/zmq_*
@ -109,5 +107,10 @@ make check V=1 XFAIL_TESTS=tests/test_radio_dish || ( cat test-suite.log && exit
%changelog
%autochangelog
* Tue Mar 07 2023 Ben Woodard <woodard@redhat.com> - 4.3.4-2
- disable building with libunwind to fix C++ exceptions when a C applicaion loads
a module written in C++ #2175966
* Thu Mar 03 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.3.4-1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild