From 2efa260d360b2cb960b5adff9a2a1a71777f0561 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Tue, 11 Apr 2023 10:07:18 +0200 Subject: [PATCH] Port to C99 Related to: --- mariadb-c99.patch | 21 +++++++++++++++++++++ mariadb.spec | 7 ++++++- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 mariadb-c99.patch diff --git a/mariadb-c99.patch b/mariadb-c99.patch new file mode 100644 index 0000000..ce01dd7 --- /dev/null +++ b/mariadb-c99.patch @@ -0,0 +1,21 @@ +rocksdb: Define _GNU_SOURCE during fallocate CMake probe + +The glibc headers declare fallocate only if _GNU_SOURCE is defined. +Upstream rocksdb does not need this because the probe is run with the +C++ compiler, and current g++ versions define _GNU_SOURCE +automatically. + +Submitted upstream: + + +diff -ur mariadb-10.5.18-downstream_modified.orig/storage/rocksdb/build_rocksdb.cmake mariadb-10.5.18-downstream_modified/storage/rocksdb/build_rocksdb.cmake +--- mariadb-10.5.18-downstream_modified.orig/storage/rocksdb/build_rocksdb.cmake 2022-11-02 13:37:22.000000000 +0100 ++++ mariadb-10.5.18-downstream_modified/storage/rocksdb/build_rocksdb.cmake 2023-04-11 09:42:17.295837813 +0200 +@@ -138,6 +138,7 @@ + if(WITH_FALLOCATE AND UNIX) + include(CheckCSourceCompiles) + CHECK_C_SOURCE_COMPILES(" ++#define _GNU_SOURCE + #include + #include + int main() { diff --git a/mariadb.spec b/mariadb.spec index 65cfe6d..1524270 100644 --- a/mariadb.spec +++ b/mariadb.spec @@ -150,7 +150,7 @@ Name: mariadb Version: 10.5.18 -Release: 2%{?with_debug:.debug}%{?dist} +Release: 3%{?with_debug:.debug}%{?dist} Epoch: 3 Summary: A very fast and robust SQL database server @@ -212,6 +212,7 @@ Patch10: %{pkgnamepatch}-ssl-cipher-tests.patch # https://gcc.gnu.org/gcc-13/porting_to.html Patch11: mariadb-10.5-gcc13.patch Patch12: rocksdb-6.8-gcc13.patch +Patch13: mariadb-c99.patch BuildRequires: make BuildRequires: cmake gcc-c++ @@ -746,6 +747,7 @@ rm -r storage/rocksdb/ %patch11 -p1 %if %{with rocksdb} %patch12 -p1 -d storage/rocksdb/rocksdb/ +%patch13 -p1 %endif # generate a list of tests that fail, but are not disabled by upstream @@ -1646,6 +1648,9 @@ fi %endif %changelog +* Tue Apr 11 2023 Florian Weimer - 3:10.5.18-3 +- Port to C99 + * Thu Jan 19 2023 Fedora Release Engineering - 3:10.5.18-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild